def test_list_no_auth(self): response = auth_util.list_test(self.client, self.model_name) self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)
def test_list_auth(self): response = \ auth_util.list_test(self.client, self.model_name, auth=True) self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_list_auth(self): """ Forbidden for non-admin users. """ response = auth_util.list_test(self.client, self.model_name, True) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)