diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-11-20 15:30:48 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-12-31 16:10:47 -0500 |
commit | 03f61d23719b2269110f042973475ab3a31b83a3 (patch) | |
tree | fe36230d3ba8da868431bae2d355edc6c8845775 | |
parent | e3e770dac21fe3be5b62a4fac2c696af3d09bbc1 (diff) | |
download | paramiko-03f61d23719b2269110f042973475ab3a31b83a3.tar.gz |
flake8
-rw-r--r-- | tests/test_auth.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/test_auth.py b/tests/test_auth.py index d85fb716..b47f75d3 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -51,7 +51,10 @@ class NullServer (ServerInterface): if username == 'slowdive': return 'publickey,password' if username == 'paranoid': - if not self.paranoid_did_password and not self.paranoid_did_public_key: + if ( + not self.paranoid_did_password and + not self.paranoid_did_public_key + ): return 'publickey,password' elif self.paranoid_did_password: return 'publickey' @@ -97,7 +100,11 @@ class NullServer (ServerInterface): def check_auth_interactive(self, username, submethods): if username == 'commie': self.username = username - return InteractiveQuery('password', 'Please enter a password.', ('Password', False)) + return InteractiveQuery( + 'password', + 'Please enter a password.', + ('Password', False), + ) return AUTH_FAILED def check_auth_interactive_response(self, responses): @@ -166,7 +173,7 @@ class TestEdgeCaseFailures(TestAuth): self.start_server() self.tc.connect(hostkey=self.public_host_key) try: - remain = self.tc.auth_password('bad-server', 'hello') + self.tc.auth_password('bad-server', 'hello') except: etype, evalue, etb = sys.exc_info() self.assertTrue(issubclass(etype, AuthenticationException)) @@ -181,7 +188,7 @@ class TestEdgeCaseFailures(TestAuth): self.start_server() self.tc.connect() try: - remain = self.tc.auth_password('unresponsive-server', 'hello') + self.tc.auth_password('unresponsive-server', 'hello') except: etype, evalue, etb = sys.exc_info() self.assertTrue(issubclass(etype, AuthenticationException)) @@ -270,7 +277,10 @@ class TestMultipartAuth(TestAuth): """ self.start_server() self.tc.connect(hostkey=self.public_host_key) - remain = self.tc.auth_password(username='paranoid', password='paranoid') + remain = self.tc.auth_password( + username='paranoid', + password='paranoid', + ) self.assertEqual(['publickey'], remain) key = DSSKey.from_private_key_file(_support('test_dss.key')) remain = self.tc.auth_publickey(username='paranoid', key=key) |