Ejemplo n.º 1
0
 def setUp(self):
     # Sets up the root user, toggles auth
     u = auth.EtcdUser(self.client, 'root')
     u.password = '******'
     u.write()
     self.client = etcd.Client(port=6001,
                               username='******',
                               password='******')
     self.unauth_client = etcd.Client(port=6001)
     a = auth.Auth(self.client)
     a.active = True
Ejemplo n.º 2
0
 def tearDown(self):
     u = auth.EtcdUser(self.client, 'test_user')
     r = auth.EtcdRole(self.client, 'test_role')
     try:
         u.delete()
     except:
         pass
     try:
         r.delete()
     except:
         pass
     a = auth.Auth(self.client)
     a.active = False