From 051c29a26293b37d3feb8046857cc6c187337a8e Mon Sep 17 00:00:00 2001 From: juanifioren Date: Tue, 14 Jul 2015 13:27:46 -0300 Subject: [PATCH] Refactoring tests. --- example_project/provider_app/settings.py | 3 ++- oidc_provider/tests/app/__init__.py | 0 oidc_provider/tests/{test_settings.py => app/settings.py} | 8 +++++--- oidc_provider/tests/{test_urls.py => app/urls.py} | 0 oidc_provider/tests/{ => app}/utils.py | 0 oidc_provider/tests/test_authorize_endpoint.py | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 oidc_provider/tests/app/__init__.py rename oidc_provider/tests/{test_settings.py => app/settings.py} (86%) rename oidc_provider/tests/{test_urls.py => app/urls.py} (100%) rename oidc_provider/tests/{ => app}/utils.py (100%) diff --git a/example_project/provider_app/settings.py b/example_project/provider_app/settings.py index 3c07579..17cdd5f 100644 --- a/example_project/provider_app/settings.py +++ b/example_project/provider_app/settings.py @@ -75,4 +75,5 @@ LOGIN_REDIRECT_URL = '/' # OIDC Provider settings. -SITE_URL = 'http://localhost:8000' \ No newline at end of file +SITE_URL = 'http://localhost:8000' +OIDC_RSA_KEY_FOLDER = BASE_DIR diff --git a/oidc_provider/tests/app/__init__.py b/oidc_provider/tests/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/oidc_provider/tests/test_settings.py b/oidc_provider/tests/app/settings.py similarity index 86% rename from oidc_provider/tests/test_settings.py rename to oidc_provider/tests/app/settings.py index 122eb0c..4cbfc39 100644 --- a/oidc_provider/tests/test_settings.py +++ b/oidc_provider/tests/app/settings.py @@ -1,6 +1,7 @@ import os from datetime import timedelta + DEBUG = False DATABASES = { @@ -45,9 +46,9 @@ INSTALLED_APPS = ( 'oidc_provider', ) -SECRET_KEY = 'secret-for-test-secret-top-secret' +SECRET_KEY = 'this-is-top-secret' -ROOT_URLCONF = 'oidc_provider.tests.test_urls' +ROOT_URLCONF = 'oidc_provider.tests.app.urls' TEMPLATE_DIRS = ( "oidc_provider/tests/templates", @@ -55,4 +56,5 @@ TEMPLATE_DIRS = ( # OIDC Provider settings. -SITE_URL = 'http://localhost:8000' \ No newline at end of file +SITE_URL = 'http://localhost:8000' +OIDC_RSA_KEY_FOLDER = os.path.dirname(__file__) diff --git a/oidc_provider/tests/test_urls.py b/oidc_provider/tests/app/urls.py similarity index 100% rename from oidc_provider/tests/test_urls.py rename to oidc_provider/tests/app/urls.py diff --git a/oidc_provider/tests/utils.py b/oidc_provider/tests/app/utils.py similarity index 100% rename from oidc_provider/tests/utils.py rename to oidc_provider/tests/app/utils.py diff --git a/oidc_provider/tests/test_authorize_endpoint.py b/oidc_provider/tests/test_authorize_endpoint.py index 3d1ec3e..dde8e32 100644 --- a/oidc_provider/tests/test_authorize_endpoint.py +++ b/oidc_provider/tests/test_authorize_endpoint.py @@ -12,7 +12,7 @@ from django.test import TestCase from oidc_provider import settings from oidc_provider.models import * -from oidc_provider.tests.utils import * +from oidc_provider.tests.app.utils import * from oidc_provider.views import *