10
10
from mako .lookup import TemplateLookup
11
11
from wsgi_intercept .interceptor import RequestsInterceptor , UrllibInterceptor
12
12
13
- from pyff .api import mkapp
13
+ from pyff .api import mkapp
14
14
from pyff .constants import config
15
15
from pyff .test import SignerTestCase
16
16
from pyff .test .test_pipeline import PipeLineTest
@@ -20,6 +20,7 @@ class PyFFAPITest(PipeLineTest):
20
20
"""
21
21
Runs twill tests using the wsgi-intercept
22
22
"""
23
+
23
24
mdx = None
24
25
mdx_template = None
25
26
app = None
@@ -31,7 +32,7 @@ def setUpClass(cls):
31
32
cls .templates = TemplateLookup (directories = [os .path .join (cls .datadir , 'mdx' )])
32
33
with tempfile .TemporaryDirectory () as td :
33
34
cls .tmp = td
34
- cls .mdx = os .path .join (td ,'mdx.fd' )
35
+ cls .mdx = os .path .join (td , 'mdx.fd' )
35
36
cls .mdx_template = cls .templates .get_template ('mdx.fd' )
36
37
with open (cls .mdx , "w+" ) as fd :
37
38
fd .write (cls .mdx_template .render (ctx = cls ))
@@ -132,7 +133,7 @@ def test_load_and_query(self):
132
133
data = r .json ()
133
134
assert data is not None and len (data ) == 1
134
135
info = data [0 ]
135
- assert type ( info ) == dict
136
+ assert info is dict
136
137
assert info ['title' ] == 'NORDUnet'
137
138
assert 'nordu.net' in info ['scope' ]
138
139
@@ -141,7 +142,10 @@ def test_load_and_query(self):
141
142
assert r .status_code == 200
142
143
data = r .json ()
143
144
info = data [0 ]
144
- assert 'https://box-idp.nordu.net/simplesaml/module.php/saml/sp/discoResponse' in info ['discovery_responses' ]
145
+ assert (
146
+ 'https://box-idp.nordu.net/simplesaml/module.php/saml/sp/discoResponse' in info ['discovery_responses' ]
147
+ )
148
+
145
149
146
150
class PyFFAPITestResources (PipeLineTest ):
147
151
"""
0 commit comments