Merge pull request #73 from pabluk/fix-get_issuer

Fix #72 get_issuer() returns a wrong value.
This commit is contained in:
Juan Ignacio Fiorentino 2016-01-17 14:03:01 -03:00
commit 660b9c6ea1
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')