From 161622610542ca74a65c61dfb8dfa4c5840d914c Mon Sep 17 00:00:00 2001 From: Thorsten Sick Date: Thu, 22 Jul 2021 14:39:00 +0200 Subject: [PATCH] This one makes PEP8 happy --- plugins/base/ssh_features.py | 2 +- tests/test_config.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/base/ssh_features.py b/plugins/base/ssh_features.py index 90cf18c..45c9e0a 100644 --- a/plugins/base/ssh_features.py +++ b/plugins/base/ssh_features.py @@ -128,7 +128,7 @@ class SSHFeatures(BasePlugin): try: res = self.connection.put(src, dst) except (paramiko.ssh_exception.SSHException, socket.timeout, UnexpectedExit): - self.vprint(f"PUT Failed to connect", 1) + self.vprint("PUT Failed to connect", 1) do_retry = True except paramiko.ssh_exception.NoValidConnectionsError as error: self.vprint(f"No valid connection. Errors: {error.errors}", 1) diff --git a/tests/test_config.py b/tests/test_config.py index 9c13028..f6f3947 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -187,14 +187,15 @@ class TestMachineConfig(unittest.TestCase): def test_missing_vmip(self): """ Testing if missing vm ip is handled""" + vm_name = "target1" mc = MachineConfig({"root": "systems/attacker1", "os": "linux", "vm_controller": { "type": "vagrant", "vagrantfilepath": "systems", }, - "vm_name": "target1"}) - self.assertEqual(mc.vm_ip(), None) + "vm_name": vm_name}) + self.assertEqual(mc.vm_ip(), vm_name) def test_machinepath(self): """ Testing machinepath setting """