Explorar el Código

Fixed discovery to make sure app is in INSTALLED_APPS

Vitaly Babiy hace 16 años
padre
commit
801c25f474
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  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()