Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Update base API-testcase for PUT requests

Roland Geider38fc25deb48e
diff --git a/wger/manager/tests/testcase.py b/wger/manager/tests/testcase.py
index 394237a3d..f62ee7ed2 100644
--- a/wger/manager/tests/testcase.py
+++ b/wger/manager/tests/testcase.py
@@ -601,19 +601,16 @@ class ApiBaseResourceTestCase(ResourceTestCase, BaseTestCase):
# User with access
if self.resource_updatable:
- # TODO: request errors out
- #response = self.api_client.put(self.url,
- # data=self.data,
- # authentication=self.get_credentials())
- #self.assertHttpUnauthorized(response)
- pass
+ response = self.api_client.put(self.url,
+ data=self.data,
+ authentication=self.get_credentials())
+ self.assertHttpUnauthorized(response)
# If a different user should fail, test
- #response = self.api_client.put(self.url,
- # data=self.data,
- # authentication=self.get_credentials(self.user_fail))
- #self.assertHttpUnauthorized(response)
- pass
+ response = self.api_client.put(self.url,
+ data=self.data,
+ authentication=self.get_credentials(self.user_fail))
+ self.assertHttpUnauthorized(response)
# public resource (ingredients, exercises), no authentication needed
else: