def test_qualify_id__without_provider(self): unit = Unit({}) self.assertEqual(unit.qualify_id('id'), 'id') self.assertEqual(unit.qualify_id('some-ns::id'), 'some-ns::id')
def test_qualify_id__with_provider(self): provider = mock.Mock(spec_set=IProvider1) provider.namespace = 'ns' unit = Unit({}, provider=provider) self.assertEqual(unit.qualify_id('id'), 'ns::id') self.assertEqual(unit.qualify_id('some-ns::id'), 'some-ns::id')