diff options
-rw-r--r-- | dev-requirements.txt | 6 | ||||
-rw-r--r-- | tests/test_client.py | 10 | ||||
-rw-r--r-- | tests/test_util.py | 10 |
3 files changed, 10 insertions, 16 deletions
diff --git a/dev-requirements.txt b/dev-requirements.txt index 4c118991..9a7be339 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,10 +2,10 @@ invoke>=1.0,<2.0 invocations>=1.2.0,<2.0 # NOTE: pytest-relaxed currently only works with pytest >=3, <3.3 -pytest>=3.2,<3.3 -pytest-relaxed==1.1.4 +pytest==4.6.3 +pytest-relaxed==1.1.5 # pytest-xdist for test dir watching and the inv guard task -pytest-xdist>=1.22,<1.25.0 +pytest-xdist==1.28.0 mock==2.0.0 # Linting! flake8==3.6.0 diff --git a/tests/test_client.py b/tests/test_client.py index 98f72143..9191fc01 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -371,15 +371,13 @@ class SSHClientTest(ClientTest): os.close(fd) client = paramiko.SSHClient() - self.assertEquals(0, len(client.get_host_keys())) + assert len(client.get_host_keys()) == 0 host_id = "[%s]:%d" % (self.addr, self.port) client.get_host_keys().add(host_id, "ssh-rsa", public_host_key) - self.assertEquals(1, len(client.get_host_keys())) - self.assertEquals( - public_host_key, client.get_host_keys()[host_id]["ssh-rsa"] - ) + assert len(client.get_host_keys()) == 1 + assert public_host_key == client.get_host_keys()[host_id]["ssh-rsa"] client.save_host_keys(localname) @@ -430,7 +428,7 @@ class SSHClientTest(ClientTest): with paramiko.SSHClient() as tc: self.tc = tc self.tc.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - self.assertEquals(0, len(self.tc.get_host_keys())) + assert len(self.tc.get_host_keys()) == 0 self.tc.connect(**dict(self.connect_kwargs, password="pygmalion")) self.event.wait(1.0) diff --git a/tests/test_util.py b/tests/test_util.py index a99dbea8..465e75b8 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -450,9 +450,7 @@ Host param4 "p a r" "p" "par" para f = StringIO(test_config_file) config = paramiko.util.parse_ssh_config(f) for host, values in res.items(): - self.assertEquals( - paramiko.util.lookup_ssh_host_config(host, config), values - ) + assert paramiko.util.lookup_ssh_host_config(host, config) == values def test_quoted_params_in_config(self): test_config_file = """\ @@ -483,9 +481,7 @@ Host param3 parara f = StringIO(test_config_file) config = paramiko.util.parse_ssh_config(f) for host, values in res.items(): - self.assertEquals( - paramiko.util.lookup_ssh_host_config(host, config), values - ) + assert paramiko.util.lookup_ssh_host_config(host, config) == values def test_quoted_host_in_config(self): conf = SSHConfig() @@ -504,7 +500,7 @@ Host param3 parara } incorrect_data = ['param"', '"param', 'param "pam', 'param "pam" "p a'] for host, values in correct_data.items(): - self.assertEquals(conf._get_hosts(host), values) + assert conf._get_hosts(host) == values for host in incorrect_data: self.assertRaises(Exception, conf._get_hosts, host) |