コード例 #1
0
 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')
コード例 #2
0
 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')