Пример #1
0
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
Пример #2
0
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
Пример #3
0
    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)
Пример #4
0
    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)
Пример #5
0
 def listScopes(self):
     return TokenScope.listScopes()
Пример #6
0
 def listScopes(self, params):
     return TokenScope.listScopes()