corrected deprecated test routine
@@ -50,12 +50,13 @@ class TestSetAccessRules(HSRESTTestCase):
access_url = "/hsapi/resource/accessRules/{res_id}/".format(res_id=res_id)
response = self.client.put(access_url, {'public': True})
- self.assertEqual(response.status_code, status.HTTP_200_OK)
+ # the resource does not have content file, so it cannot be made public
+ self.assertEqual(response.status_code, status.status.HTTP_403_FORBIDDEN)
response = self.client.get(sysmeta_url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
content = json.loads(response.content)
- self.assertTrue(content['public'])
+ self.assertFalse(content['public'])
def test_get_access_rules_via_sysmeta(self):
rtype = 'GenericResource'
