diff --git a/tests/common_test_class.py b/tests/common_test_class.py index 9bb9fd67..034cc2f5 100644 --- a/tests/common_test_class.py +++ b/tests/common_test_class.py @@ -69,6 +69,10 @@ class AbstractPillarTest(TestMinimal): # Not only delete self.app (like the superclass does), # but also un-import the application. del sys.modules['application'] + remove = [modname for modname in sys.modules + if modname.startswith('application.')] + for modname in remove: + del sys.modules[modname] def ensure_file_exists(self, file_overrides=None): self.ensure_project_exists()