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:
Aymeric Augustin 2013-12-17 10:27:08 +01:00
parent 4a56a93cc4
commit 6e895f9e06
50 changed files with 9 additions and 16 deletions

View File

@ -1 +0,0 @@
# Empty models.py to allow for specifying admindocs as a test label.

View File

@ -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.

View File

@ -1 +0,0 @@
# Models module required so tests are discovered.

View File

@ -1 +1,2 @@
# This file intentionally left blank # This file is required to pretend sitemaps has models.
# Otherwise test models cannot be registered.

View File

@ -1 +0,0 @@
# Models file for tests to run.

View File

@ -1 +0,0 @@
# models.py file for tests to run.

View File

@ -1 +0,0 @@
# A models.py so that tests run.

View File

View File

@ -1 +0,0 @@
#

View File

@ -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.

View File

@ -1 +0,0 @@
# Need a models module for the test runner.

View File

@ -164,8 +164,7 @@ 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)

View File

@ -1 +0,0 @@
# models.py file for tests to run.

View File

@ -1 +0,0 @@
# models.py file for tests to run.

View File

View File