Fix #72 get_issuer() returns a wrong value

This commit is contained in:
Pablo SEMINARIO 2016-01-16 11:35:26 +01:00
parent 0a1eecd345
commit 9204c478ed
2 changed files with 14 additions and 1 deletions

View file

@ -21,7 +21,7 @@ def get_issuer():
"""
site_url = settings.get('SITE_URL')
path = reverse('oidc_provider:provider_info') \
.split('/.well-known/openid-configuration/')[0]
.split('/.well-known/openid-configuration')[0]
issuer = site_url + path
return issuer

View file

@ -0,0 +1,13 @@
from django.conf import settings
from django.test import TestCase
from oidc_provider.lib.utils.common import get_issuer
class CommonTest(TestCase):
"""
Test cases for common utils.
"""
def test_get_issuer(self):
issuer = get_issuer()
self.assertEqual(issuer, settings.SITE_URL + '/openid')