Skip to content
Snippets Groups Projects
Commit 3fb8b579 authored by Chris Pastl's avatar Chris Pastl
Browse files

Fix assertions for POST/PUT requests

parent 9981b395
No related branches found
No related tags found
1 merge request!7Commit the OpenAPI generated tests into "./tests" and make them run successfully #24
......@@ -41,7 +41,7 @@ class TestInternalController(BaseTestCase):
data=json.dumps(body),
content_type="application/json",
)
self.assert200(response, "Response body is : " + response.data.decode("utf-8"))
self.assert204(response, "Response body is : " + response.data.decode("utf-8"))
def test_clock_info(self):
"""Test case for clock_info
......@@ -110,7 +110,7 @@ class TestInternalController(BaseTestCase):
data=json.dumps(body),
content_type="application/json",
)
self.assert200(response, "Response body is : " + response.data.decode("utf-8"))
self.assert204(response, "Response body is : " + response.data.decode("utf-8"))
def test_set_active_source(self):
"""Test case for set_active_source
......@@ -120,7 +120,7 @@ class TestInternalController(BaseTestCase):
response = self.client.open(
"/api/v1/source/active/{number}".format(number=2), method="PUT"
)
self.assert200(response, "Response body is : " + response.data.decode("utf-8"))
self.assert204(response, "Response body is : " + response.data.decode("utf-8"))
def test_set_clock_info(self):
"""Test case for set_clock_info
......@@ -132,7 +132,7 @@ class TestInternalController(BaseTestCase):
response = self.client.open(
"/api/v1/clock", method="PUT", data=json.dumps(body), content_type="application/json"
)
self.assert200(response, "Response body is : " + response.data.decode("utf-8"))
self.assert204(response, "Response body is : " + response.data.decode("utf-8"))
if __name__ == "__main__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment