|
|
@@ -32,7 +32,7 @@ class ImageTests(APITestCase): |
|
|
|
data=data, |
|
|
|
format='json', |
|
|
|
) |
|
|
|
self.assertEqual(response.status_code, 403, response.data) |
|
|
|
self.assertEqual(response.status_code, 401, response.data) |
|
|
|
|
|
|
|
|
|
|
|
class BoardPrivacyTests(APITestCase): |
|
|
@@ -220,7 +220,7 @@ class PinTests(APITestCase): |
|
|
|
self.client.logout() |
|
|
|
uri = reverse("pin-detail", kwargs={"pk": pin.pk}) |
|
|
|
response = self.client.patch(uri, format='json', data={}) |
|
|
|
self.assertEqual(response.status_code, 403) |
|
|
|
self.assertEqual(response.status_code, 401, response.data) |
|
|
|
|
|
|
|
def test_patch_detail(self): |
|
|
|
image = create_image() |
|
|
@@ -240,7 +240,8 @@ class PinTests(APITestCase): |
|
|
|
pin = create_pin(self.user, image, []) |
|
|
|
uri = reverse("pin-detail", kwargs={"pk": pin.pk}) |
|
|
|
self.client.logout() |
|
|
|
self.assertEqual(self.client.delete(uri).status_code, 403) |
|
|
|
resp = self.client.delete(uri) |
|
|
|
self.assertEqual(resp.status_code, 401, resp.data) |
|
|
|
|
|
|
|
def test_delete_detail(self): |
|
|
|
image = create_image() |
|
|
|