Exemple #1
0
 def __init__(self, identity=None, *args, **kwargs):
     self.identity = identity or FakeIdentity()
     self.name = "fake"
     self.prefix = ""
     self.service_type = "fake"
     self.clients = {}
     self.endpoints = utils.DotDict()
Exemple #2
0
 def test_dot_dict(self):
     key = "fake"
     val = utils.random_unicode()
     dct = {key: val}
     dd = utils.DotDict(dct)
     self.assertEqual(dd.fake, val)
     self.assertRaises(AttributeError, getattr, dd, "bogus")