def test_del_permission(self): user_api.del_permission( self.user_object, self.user_object.id, 1 ) del_user = user_api.get_permissions( self.user_object, self.user_object.id ) self.assertEqual([], del_user)
def test_del_permission(self): user_api.del_permission( self.user_object.id, 1, user=self.user_object, ) del_user = user_api.get_permissions( self.user_object.id, user=self.user_object, ) self.assertEqual([], del_user)
def delete_user_permission(user_id, permission_id): """Delete a specific user permission.""" data = _get_request_data() return utils.make_json_response( 200, user_api.del_permission( current_user, user_id, permission_id, **data ) )