def test_register(self): params = make_secret(password="******") sec = secret.Secret(params) con = vmfakecon.Connection() sec.register(con) virsec = con.secrets[sec.uuid] self.assertEqual(virsec.value, "12345678")
def setUp(self): self.connection = vmfakecon.Connection() self.patch = Patch([ (libvirtconnection, 'get', lambda: self.connection) ]) self.patch.apply()
def get(self, *args, **kwargs): return fake.Connection()