def test_import_object_ns_full_required_arg_present(self): obj = importutils.import_object_ns('tests2', 'cfgm_common.tests.fake.FakeDriver2', first_arg=False) self.assertEqual(obj.__class__.__name__, 'FakeDriver2')
def test_import_object_ns_full_optional_arg_not_present(self): obj = importutils.import_object_ns('tests2', 'cfgm_common.tests.fake.FakeDriver') self.assertEqual(obj.__class__.__name__, 'FakeDriver')
def test_import_object_ns_optional_arg_present(self): obj = importutils.import_object_ns('cfgm_common.tests', 'fake.FakeDriver', first_arg=False) self.assertEqual(obj.__class__.__name__, 'FakeDriver')
def test_import_object_ns_full_required_arg_present(self): obj = importutils.import_object_ns( 'tests2', 'cfgm_common.tests.fake.FakeDriver2', first_arg=False) self.assertEqual(obj.__class__.__name__, 'FakeDriver2')
def test_import_object_ns_full_optional_arg_not_present(self): obj = importutils.import_object_ns( 'tests2', 'cfgm_common.tests.fake.FakeDriver') self.assertEqual(obj.__class__.__name__, 'FakeDriver')