Skip to content
Snippets Groups Projects
Commit 6e0bdda1 authored by Samuel GAIST's avatar Samuel GAIST Committed by Samuel GAIST
Browse files

[dataformats][tests] Update tests for new put implementation

parent 00579b52
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !327. Comments created here will be created in the context of that merge request.
......@@ -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
......
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