Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 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__))
Exemple #4
0
 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__))