Remove unnecessary settings rewrite in tests.

This commit is contained in:
juanifioren 2015-07-22 16:25:17 -03:00
parent 0070260069
commit b9806ed102

View file

@ -131,9 +131,6 @@ class AuthorizationCodeFlowTestCase(TestCase):
request.user = self.user
# Remove the hook, because we want to test default behaviour.
OIDC_AFTER_USERLOGIN_HOOK = settings.default_settings.OIDC_AFTER_USERLOGIN_HOOK
with self.settings(
OIDC_AFTER_USERLOGIN_HOOK=OIDC_AFTER_USERLOGIN_HOOK):
response = AuthorizeView.as_view()(request)
# Check if hidden inputs exists in the form,
@ -246,11 +243,6 @@ class AuthorizationCodeFlowTestCase(TestCase):
request.user = self.user
# Ensure user consent skip is enabled.
OIDC_AFTER_USERLOGIN_HOOK = settings.default_settings.OIDC_AFTER_USERLOGIN_HOOK
OIDC_SKIP_CONSENT_ENABLE = settings.default_settings.OIDC_SKIP_CONSENT_ENABLE
with self.settings(
OIDC_AFTER_USERLOGIN_HOOK=OIDC_AFTER_USERLOGIN_HOOK,
OIDC_SKIP_CONSENT_ENABLE=OIDC_SKIP_CONSENT_ENABLE):
response = AuthorizeView.as_view()(request)
is_code_ok = is_code_valid(url=response['Location'],