Browse Source

Fixed discovery to make sure app is in INSTALLED_APPS

Vitaly Babiy 15 years ago
parent
commit
801c25f474
1 changed files with 3 additions and 2 deletions
  1. 3 2
      celery/tests/test_discovery.py

+ 3 - 2
celery/tests/test_discovery.py

@@ -18,5 +18,6 @@ class TestDiscovery(unittest.TestCase):
             self.assertDiscovery()
 
     def test_discovery_with_broken(self):
-        settings.INSTALLED_APPS = settings.INSTALLED_APPS + ["xxxnot.aexist"]
-        self.assertDiscovery()
+        if "someapp" in settings.INSTALLED_APPS:
+            settings.INSTALLED_APPS = settings.INSTALLED_APPS + ["xxxnot.aexist"]
+            self.assertDiscovery()