Removed superfluous models.py files.
Added comments in the three empty models.py files that are still needed. Adjusted the test runner to add applications corresponding to test labels to INSTALLED_APPS even when they don't have a models module.
This commit is contained in:
parent
4a56a93cc4
commit
6e895f9e06
|
@ -1 +0,0 @@
|
||||||
# Empty models.py to allow for specifying admindocs as a test label.
|
|
|
@ -1 +1,2 @@
|
||||||
""" models.py (even empty) currently required by the runtests.py to enable unit tests """
|
# This file is required to pretend formtools has models.
|
||||||
|
# Otherwise test models cannot be registered.
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
# Models module required so tests are discovered.
|
|
|
@ -1 +1,2 @@
|
||||||
# This file intentionally left blank
|
# This file is required to pretend sitemaps has models.
|
||||||
|
# Otherwise test models cannot be registered.
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
# whatever
|
|
|
@ -1 +0,0 @@
|
||||||
# Models file for tests to run.
|
|
|
@ -1 +0,0 @@
|
||||||
# models.py file for tests to run.
|
|
|
@ -1 +0,0 @@
|
||||||
# A models.py so that tests run.
|
|
|
@ -1 +0,0 @@
|
||||||
#
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Remove this module when pre/post_migrate are refactored to use something
|
||||||
|
# other than a models module for their "sender" argument.
|
|
@ -1 +0,0 @@
|
||||||
# Need a models module for the test runner.
|
|
|
@ -164,10 +164,9 @@ def setup(verbosity, test_labels):
|
||||||
if module_found_in_labels:
|
if module_found_in_labels:
|
||||||
if verbosity >= 2:
|
if verbosity >= 2:
|
||||||
print("Importing application %s" % module_name)
|
print("Importing application %s" % module_name)
|
||||||
mod = app_cache.load_app(module_label)
|
app_cache.load_app(module_label)
|
||||||
if mod:
|
if module_label not in settings.INSTALLED_APPS:
|
||||||
if module_label not in settings.INSTALLED_APPS:
|
settings.INSTALLED_APPS.append(module_label)
|
||||||
settings.INSTALLED_APPS.append(module_label)
|
|
||||||
|
|
||||||
return state
|
return state
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
# models.py file for tests to run.
|
|
|
@ -1 +0,0 @@
|
||||||
# models.py file for tests to run.
|
|
Loading…
Reference in New Issue