Example #1
0
 def __init__(self, context=None, admin_context=None, clients=None):
     super(BarbicanBase, self).__init__(context, admin_context, clients)
     if hasattr(self, "_admin_clients"):
         self.admin_barbican = barbican.BarbicanService(
             self._admin_clients,
             name_generator=self.generate_random_name,
             atomic_inst=self.atomic_actions())
     if hasattr(self, "_clients"):
         self.barbican = barbican.BarbicanService(
             self._clients,
             name_generator=self.generate_random_name,
             atomic_inst=self.atomic_actions())
Example #2
0
 def setUp(self):
     super(BarbicanServiceTestCase, self).setUp()
     self.clients = mock.MagicMock()
     self.name_generator = mock.MagicMock()
     self.service = barbican.BarbicanService(
         self.clients, name_generator=self.name_generator)