def test_object_modules(self): sys.modules.pop(EXAMPLE_MODULE, None) modules = tools.import_modules_recursively( os.path.dirname(tests.__file__)) self.assertIn('neutron.tests.unit.tests.example.dir.example_module', modules) self.assertIn(EXAMPLE_MODULE, sys.modules)
def test_object_modules(self): sys.modules.pop(EXAMPLE_MODULE, None) modules = tools.import_modules_recursively( os.path.dirname(tests.__file__)) self.assertIn( 'neutron.tests.unit.tests.example.dir.example_module', modules) self.assertIn(EXAMPLE_MODULE, sys.modules)
def setUp(self): super(TestObjectVersions, self).setUp() # NOTE(ihrachys): seed registry with all objects under neutron.objects # before validating the hashes tools.import_modules_recursively(os.path.dirname(objects.__file__))