diff --git a/tests/test_settings.py b/tests/test_settings.py deleted file mode 100644 index b24c4f4..0000000 --- a/tests/test_settings.py +++ /dev/null @@ -1,78 +0,0 @@ -""" -Alliance Auth Test Suite Django settings. -""" -import base64 - -from allianceauth.project_template.project_name.settings.base import * - -# Celery configuration -CELERY_ALWAYS_EAGER = True # Forces celery to run locally for testing - -INSTALLED_APPS += [ - 'allianceauth_oidc', - 'oauth2_provider' -] - -ROOT_URLCONF = 'tests.urls' - -NOSE_ARGS = [ - # '--with-coverage', - # '--cover-package=', - # '--exe', # If your tests need this to be found/run, check they py files are not chmodded +x -] - -SITE_URL = "http://localhost" - -# Django security -CSRF_TRUSTED_ORIGINS = [SITE_URL] - -PASSWORD_HASHERS = [ - 'django.contrib.auth.hashers.MD5PasswordHasher', -] - -# LOGGING = None # Comment out to enable logging for debugging - -# Register an application at https://developers.eveonline.com for Authentication -# & API Access and fill out these settings. Be sure to set the callback URL -# to https://example.com/sso/callback substituting your domain for example.com -# Logging in to auth requires the publicData scope (can be overridden through the -# LOGIN_TOKEN_SCOPES setting). Other apps may require more (see their docs). -ESI_SSO_CLIENT_ID = '123' -ESI_SSO_CLIENT_SECRET = '123' -ESI_SSO_CALLBACK_URL = '123' - -CACHES = { - "default": { - # "BACKEND": "redis_cache.RedisCache", - # "LOCATION": "localhost:6379", - # "OPTIONS": { - # "DB": 1, - # } - "BACKEND": "django_redis.cache.RedisCache", - "LOCATION": "redis://localhost:6379/1", - "OPTIONS": { - "COMPRESSOR": "django_redis.compressors.lzma.LzmaCompressor", - } - } -} - - -# This is a testing only key and not hooked up to anything so dont even bother... -pkey = b'LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlKS1FJQkFBS0NBZ0VBc2Vmd1JuTTlneGgzbDBxekxrWThYQzZSdzZpS29sS2dDci9QM1ZURU9xb2FPa0xnCjFlRy9zSzlVSFI2Q1hxQy9obzhwbTJjNzRaMUM3QytxMXRZSThveXd3NEVTcHdSZUNZY2RJcW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KEY": base64.b64decode(pkey).decode(), - "OAUTH2_VALIDATOR_CLASS": "allianceauth_oidc.auth_provider.AllianceAuthOAuth2Validator", - "SCOPES": { - "openid": "openid", - "email": "email", - "profile": "profile" - }, - "PKCE_REQUIRED": False, - "APPLICATION_ADMIN_CLASS": "allianceauth_oidc.admin.ApplicationAdmin", - 'ACCESS_TOKEN_EXPIRE_SECONDS': 60, - 'REFRESH_TOKEN_EXPIRE_SECONDS': 7*24*60*60, - 'ROTATE_REFRESH_TOKEN': True, -} diff --git a/tests/test_settingsAA3.py b/tests/test_settingsAA3.py new file mode 100644 index 0000000..0a366d7 --- /dev/null +++ b/tests/test_settingsAA3.py @@ -0,0 +1,52 @@ +""" +Alliance Auth Test Suite Django settings. +""" + +from allianceauth.project_template.project_name.settings.base import * # noqa + +# Celery configuration +CELERY_ALWAYS_EAGER = True # Forces celery to run locally for testing + +INSTALLED_APPS += [ + 'allianceauth_oidc', + 'oauth2_provider' +] + +ROOT_URLCONF = 'tests.urls' + +NOSE_ARGS = [ + # '--with-coverage', + # '--cover-package=', + # '--exe', # If your tests need this to be found/run, check they py files are not chmodded +x +] + + +PASSWORD_HASHERS = [ + 'django.contrib.auth.hashers.MD5PasswordHasher', +] + +# LOGGING = None # Comment out to enable logging for debugging + +# Register an application at https://developers.eveonline.com for Authentication +# & API Access and fill out these settings. Be sure to set the callback URL +# to https://example.com/sso/callback substituting your domain for example.com +# Logging in to auth requires the publicData scope (can be overridden through the +# LOGIN_TOKEN_SCOPES setting). Other apps may require more (see their docs). +ESI_SSO_CLIENT_ID = '123' +ESI_SSO_CLIENT_SECRET = '123' +ESI_SSO_CALLBACK_URL = '123' + +CACHES = { + "default": { + # "BACKEND": "redis_cache.RedisCache", + # "LOCATION": "localhost:6379", + # "OPTIONS": { + # "DB": 1, + # } + "BACKEND": "django_redis.cache.RedisCache", + "LOCATION": "redis://localhost:6379/1", + "OPTIONS": { + "COMPRESSOR": "django_redis.compressors.lzma.LzmaCompressor", + } + } +} diff --git a/tests/test_settingsAA4.py b/tests/test_settingsAA4.py new file mode 100644 index 0000000..4925d32 --- /dev/null +++ b/tests/test_settingsAA4.py @@ -0,0 +1,55 @@ +""" +Alliance Auth Test Suite Django settings. +""" + +from allianceauth.project_template.project_name.settings.base import * # noqa + +SITE_URL = "https://example.com" +CSRF_TRUSTED_ORIGINS = [SITE_URL] + +# Celery configuration +CELERY_ALWAYS_EAGER = True # Forces celery to run locally for testing + +INSTALLED_APPS += [ + 'allianceauth_oidc', + 'oauth2_provider' +] + +ROOT_URLCONF = 'tests.urls' + +NOSE_ARGS = [ + # '--with-coverage', + # '--cover-package=', + # '--exe', # If your tests need this to be found/run, check they py files are not chmodded +x +] + + +PASSWORD_HASHERS = [ + 'django.contrib.auth.hashers.MD5PasswordHasher', +] + +# LOGGING = None # Comment out to enable logging for debugging + +# Register an application at https://developers.eveonline.com for Authentication +# & API Access and fill out these settings. Be sure to set the callback URL +# to https://example.com/sso/callback substituting your domain for example.com +# Logging in to auth requires the publicData scope (can be overridden through the +# LOGIN_TOKEN_SCOPES setting). Other apps may require more (see their docs). +ESI_SSO_CLIENT_ID = '123' +ESI_SSO_CLIENT_SECRET = '123' +ESI_SSO_CALLBACK_URL = '123' + +CACHES = { + "default": { + # "BACKEND": "redis_cache.RedisCache", + # "LOCATION": "localhost:6379", + # "OPTIONS": { + # "DB": 1, + # } + "BACKEND": "django_redis.cache.RedisCache", + "LOCATION": "redis://localhost:6379/1", + "OPTIONS": { + "COMPRESSOR": "django_redis.compressors.lzma.LzmaCompressor", + } + } +}