Add test for STANDARD_CLAIMS values
This commit is contained in:
parent
53166fb9ea
commit
155b4598b0
1 changed files with 8 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
from oidc_provider.lib.claims import ScopeClaims
|
from oidc_provider.lib.claims import ScopeClaims, STANDARD_CLAIMS
|
||||||
from oidc_provider.tests.app.utils import create_fake_user, create_fake_client, create_fake_token
|
from oidc_provider.tests.app.utils import create_fake_user, create_fake_client, create_fake_token
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +13,13 @@ class ClaimsTestCase(TestCase):
|
||||||
self.token = create_fake_token(self.user, self.scopes, self.client)
|
self.token = create_fake_token(self.user, self.scopes, self.client)
|
||||||
self.scopeClaims = ScopeClaims(self.token)
|
self.scopeClaims = ScopeClaims(self.token)
|
||||||
|
|
||||||
|
def test_empty_standard_claims(self):
|
||||||
|
for v in [v for k, v in STANDARD_CLAIMS.items() if k != 'address']:
|
||||||
|
self.assertEqual(v, '')
|
||||||
|
|
||||||
|
for v in STANDARD_CLAIMS['address'].values():
|
||||||
|
self.assertEqual(v, '')
|
||||||
|
|
||||||
def test_clean_dic(self):
|
def test_clean_dic(self):
|
||||||
""" assert that _clean_dic function returns a clean dictionnary
|
""" assert that _clean_dic function returns a clean dictionnary
|
||||||
(no empty claims) """
|
(no empty claims) """
|
||||||
|
|
Loading…
Reference in a new issue