From aed022af90b2d1bdbdfcd4b088b406afdd590aff Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Wed, 27 Feb 2019 09:21:13 +0100 Subject: [PATCH] [algorithms][tests][api] Fix CXX test The binary handling wasn't done. --- beat/web/algorithms/tests/tests_api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/beat/web/algorithms/tests/tests_api.py b/beat/web/algorithms/tests/tests_api.py index 436169594..7c7ada183 100755 --- a/beat/web/algorithms/tests/tests_api.py +++ b/beat/web/algorithms/tests/tests_api.py @@ -1063,6 +1063,16 @@ class AlgorithmCreation(AlgorithmsAPIBase): self.assertEqual(algorithm.description, b"blah") self.assertEqual(algorithm.language, Code.CXX) self.assertFalse(algorithm.valid()) + + url = reverse("api_algorithms:binary", args=["jackdoe", "valid-name1", 1]) + + updated_binary_file = SimpleUploadedFile( + "algo.so", AlgorithmsAPIBase.BINARY, content_type="application/octet-stream" + ) + + response = self.client.post(url, {"binary": updated_binary_file}) + self.checkResponse(response, 204) + self.checkAlgorithm( algorithm, declaration=AlgorithmsAPIBase.CXX_DECLARATION, code=None ) -- GitLab