Beispiel #1
0
 def test_get_service_id(self):
     id_map = {
         'mysql': '123',
         'percona': 'abc'
     }
     mixin = NotifyMixin()
     self.assertThat(mixin._get_service_id('mysql', id_map), Equals('123'))
Beispiel #2
0
 def test_get_service_id_unknown(self):
     id_map = {
         'mysql': '123',
         'percona': 'abc'
     }
     transformer = NotifyMixin()
     self.assertThat(transformer._get_service_id('m0ng0', id_map),
                     Equals('unknown-service-id-error'))