|
@@ -93,10 +93,11 @@ class test_LoaderBase:
|
|
|
def trigger_exception(**kwargs):
|
|
|
raise ImportError('Dummy ImportError')
|
|
|
from celery.signals import import_modules
|
|
|
- import_modules.connect(trigger_exception)
|
|
|
+ x = import_modules.connect(trigger_exception)
|
|
|
self.app.conf.imports = ('os', 'sys')
|
|
|
with pytest.raises(ImportError):
|
|
|
self.loader.import_default_modules()
|
|
|
+ import_modules.disconnect(x)
|
|
|
|
|
|
def test_import_from_cwd_custom_imp(self):
|
|
|
imp = Mock(name='imp')
|