def test_credentials(self): server_one = serverprovider.Server(*self.vals) creds = server_one.get_credentials() server_two = serverprovider.Server.from_credentials(creds) for k in self.keys: self.assertEqual(getattr(server_one, k), getattr(server_two, k))
def test_init_server_dto(self): server = serverprovider.Server(*self.vals) for k, v in dict(zip(self.keys, self.vals)).iteritems(): self.assertEqual(getattr(server, k), v) self.assertIsInstance(server.ssh, sshutils.SSH)