Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Stopped assuming that INSTALLED_APPS only contains app names.

While this assumption is true for the time being, it makes the code
needlessly brittle.
  • Loading branch information...
commit 74d8fdcfa6a49cb30210c690dff08fc62b642e2a 1 parent 4dc3be2
Aymeric Augustin authored January 18, 2014

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  tests/runtests.py
3  tests/runtests.py
@@ -167,11 +167,12 @@ def no_available_apps(self):
167 167
                 module_label == label or module_label.startswith(label + '.')
168 168
                 for label in test_labels_set)
169 169
 
  170
+        installed_app_names = set(get_installed())
170 171
         if module_found_in_labels:
171 172
             if verbosity >= 2:
172 173
                 print("Importing application %s" % module_name)
173 174
             # HACK.
174  
-            if module_label not in settings.INSTALLED_APPS:
  175
+            if module_label not in installed_app_names:
175 176
                 settings.INSTALLED_APPS.append(module_label)
176 177
             app_config = AppConfig.create(module_label)
177 178
             apps.app_configs[app_config.label] = app_config

0 notes on commit 74d8fdc

Please sign in to comment.
Something went wrong with that request. Please try again.