Skip to content

Commit 6d9c005

Browse files
simo5frozencemetery
authored andcommitted
Fix flake8 issues to pass build
Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Robbie Harwood <rharwood@redhat.com>
1 parent 9112cc8 commit 6d9c005

13 files changed

+21
-5
lines changed

tests/magtests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# check that we can import requests (for use in test scripts)
1414
import requests
15+
1516
import requests_gssapi
1617
del requests
1718
del requests_gssapi

tests/t_bad_acceptor_name.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os
5+
56
import requests
67
from requests_gssapi import HTTPKerberosAuth, OPTIONAL # noqa
78

tests/t_basic_k5.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os
5+
56
import requests
67
from requests.auth import HTTPBasicAuth
78

tests/t_basic_k5_fail_second.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os
5+
56
import requests
67

78

tests/t_basic_k5_two_users.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os
5+
56
import requests
67

78

tests/t_basic_proxy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os
5+
56
import requests
67
from requests.auth import HTTPBasicAuth
78

tests/t_localname.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
# Copyright (C) 2020 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os
5-
import gssapi
6-
import requests
75
import subprocess
86
import sys
7+
8+
import gssapi
9+
10+
import requests
11+
912
from requests_gssapi import HTTPSPNEGOAuth
1013

14+
1115
def use_requests(auth):
1216
sess = requests.Session()
1317
url = 'http://%s/gss_localname/' % os.environ['NSS_WRAPPER_HOSTNAME']
@@ -39,14 +43,14 @@ def use_curl():
3943
if len(sys.argv) > 1:
4044
mech_name = sys.argv[1]
4145

42-
mech=None
46+
mech = None
4347
if mech_name is not None:
4448
mech = gssapi.mechs.Mechanism.from_sasl_name(mech_name)
4549

4650
try:
4751
auth = HTTPSPNEGOAuth(mech=mech)
4852
use_requests(auth)
49-
except TypeError as e:
53+
except TypeError:
5054
# odler version of requests that does not support mechs
5155
if mech_name == 'SPNEGO':
5256
use_curl()
@@ -55,4 +59,4 @@ def use_curl():
5559
auth = HTTPSPNEGOAuth()
5660
use_requests(auth)
5761
else:
58-
sys.exit(42) # SKIP
62+
sys.exit(42) # SKIP

tests/t_nonego.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os
5+
56
import requests
67

78

tests/t_required_name_attr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os
5+
56
import requests
67
from requests_gssapi import HTTPKerberosAuth, OPTIONAL # noqa
78

tests/t_spnego_negotiate_once.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os
5+
56
import requests
67
from requests_gssapi import HTTPKerberosAuth, OPTIONAL # noqa
78

0 commit comments

Comments
 (0)