def show_permission(permission_id): """Get permission.""" data = _get_request_args() return utils.make_json_response( 200, permission_api.get_permission(current_user, permission_id, **data) )
def test_get_permission(self): get_permission = permission.get_permission(1, user=self.user_object) self.assertIsNotNone(get_permission) expected = { 'alias': 'list permissions', 'description': 'list all permissions', 'id': 1, 'name': 'list_permissions' } self.assertDictEqual(get_permission, expected)
def test_get_permission(self): get_permission = permission.get_permission( 1, user=self.user_object) self.assertIsNotNone(get_permission) expected = { 'alias': 'list permissions', 'description': 'list all permissions', 'id': 1, 'name': 'list_permissions' } self.assertDictEqual(get_permission, expected)
def test_get_permission(self): get_permission = permission.get_permission(self.user_object, 1) self.assertIsNotNone(get_permission)