mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-21 04:11:06 -05:00
Tests: Simplify Django version compatibility
* Restructure runtests.py as suggested in https://docs.djangoproject.com/en/1.9/topics/testing/advanced/#using-the-django-test-runner-to-test-reusable-applications * Load version-specific Django settings modules (rather than trying to make a single settings.configure() work with all supported versions). * Use `django-admin startproject` defaults for all settings modules. (Tests compatibility with typical apps, middleware, and other settings.) * Set up tests-specific url config; switch to literal urls in test cases. (Eliminates url `reverse` from tests.) * Make runtests.py executable Closes #18
This commit is contained in:
14
tests/test_settings/__init__.py
Normal file
14
tests/test_settings/__init__.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# These are the default "django-admin startproject" settings.py files
|
||||
# for each supported version of Django, with:
|
||||
#
|
||||
# * "anymail" appended to INSTALLED_APPS
|
||||
# * ROOT_URLCONF = 'tests.test_settings.urls'
|
||||
#
|
||||
# Keeping a file for each Django version is simpler than trying
|
||||
# to maintain warning-free compatibility with all Django versions
|
||||
# in a single settings list.
|
||||
#
|
||||
# It also helps ensure compatibility with default apps, middleware, etc.
|
||||
#
|
||||
# You can typically find the default settings.py template in
|
||||
# SITE_PACKAGES/django/conf/project_template/project_name/settings.py-tpl
|
||||
Reference in New Issue
Block a user