def testListScopes(server): resp = server.request('/token/scopes') assertStatusOk(resp) assert resp.json == TokenScope.listScopes() assert 'custom' in resp.json assert isinstance(resp.json['custom'], list) assert 'adminCustom' in resp.json assert isinstance(resp.json['adminCustom'], list) for scope in resp.json['custom'] + resp.json['adminCustom']: assert 'id' in scope assert 'name' in scope assert 'description' in scope
def testListScopes(self): resp = self.request('/token/scopes') self.assertStatusOk(resp) self.assertEqual(resp.json, TokenScope.listScopes()) self.assertIn('custom', resp.json) self.assertIsInstance(resp.json['custom'], list) self.assertIn('adminCustom', resp.json) self.assertIsInstance(resp.json['adminCustom'], list) for scope in resp.json['custom'] + resp.json['adminCustom']: self.assertIn('id', scope) self.assertIn('name', scope) self.assertIn('description', scope)
def listScopes(self): return TokenScope.listScopes()
def listScopes(self, params): return TokenScope.listScopes()