diff --git a/beat/web/dataformats/tests/tests_api.py b/beat/web/dataformats/tests/tests_api.py index da8f136914ba0e88b14d514ed6b2f40c22b2d8cd..56f639975feedd3d86e52f078048ec663f6e5717 100644 --- a/beat/web/dataformats/tests/tests_api.py +++ b/beat/web/dataformats/tests/tests_api.py @@ -521,7 +521,8 @@ class DataFormatUpdate(DataFormatsAPIBase): self.login_jackdoe() url = reverse("api_dataformats:object", args=["jackdoe", "format2", 1]) response = self.client.put(url) - self.checkResponse(response, 400) + + self.checkResponse(response, 200, content_type="application/json") def test_fail_to_update_a_shared_dataformat(self): self.login_johndoe() @@ -545,7 +546,7 @@ class DataFormatUpdate(DataFormatsAPIBase): content_type="application/json", ) - self.checkResponse(response, 204) + self.checkResponse(response, 200, content_type="application/json") dataformat = DataFormat.objects.get( author__username="johndoe", name="format_private" @@ -567,7 +568,7 @@ class DataFormatUpdate(DataFormatsAPIBase): content_type="application/json", ) - self.checkResponse(response, 204) + self.checkResponse(response, 200, content_type="application/json") dataformat = DataFormat.objects.get(author__username="johndoe", name="format1") self.assertEqual(dataformat.description, b"blah") @@ -581,7 +582,7 @@ class DataFormatUpdate(DataFormatsAPIBase): content_type="application/json", ) - self.checkResponse(response, 204) + self.checkResponse(response, 200, content_type="application/json") dataformat = DataFormat.objects.get( author__username="johndoe", name="format_private" @@ -612,7 +613,7 @@ class DataFormatUpdate(DataFormatsAPIBase): content_type="application/json", ) - self.checkResponse(response, 204) + self.checkResponse(response, 200, content_type="application/json") dataformat = DataFormat.objects.get( author__username="johndoe", name="format_private", version=1 @@ -646,7 +647,7 @@ class DataFormatUpdate(DataFormatsAPIBase): content_type="application/json", ) - self.checkResponse(response, 204) + self.checkResponse(response, 200, content_type="application/json") dataformat = DataFormat.objects.get( author__username="johndoe", name="format4", version=1 @@ -674,7 +675,7 @@ class DataFormatUpdate(DataFormatsAPIBase): content_type="application/json", ) - self.checkResponse(response, 204) + self.checkResponse(response, 200, content_type="application/json") dataformat = DataFormat.objects.get( author__username="johndoe", name="format4", version=1 @@ -703,7 +704,7 @@ class DataFormatUpdate(DataFormatsAPIBase): content_type="application/json", ) - self.checkResponse(response, 204) + self.checkResponse(response, 200, content_type="application/json") dataformat = DataFormat.objects.get( author__username="johndoe", name="format_private", version=1 @@ -740,7 +741,7 @@ class DataFormatUpdate(DataFormatsAPIBase): content_type="application/json", ) - self.checkResponse(response, 204) + self.checkResponse(response, 200, content_type="application/json") dataformat = DataFormat.objects.get( author__username="johndoe", name="format4", version=1 @@ -768,7 +769,7 @@ class DataFormatUpdate(DataFormatsAPIBase): content_type="application/json", ) - self.checkResponse(response, 204) + self.checkResponse(response, 200, content_type="application/json") dataformat = DataFormat.objects.get( author__username="johndoe", name="format4", version=1