Skip to content

Commit 7b76cc5

Browse files
Use modern type comparasion. black fixes.
1 parent e66b30c commit 7b76cc5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/pyff/test/test_md_api.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from mako.lookup import TemplateLookup
1111
from wsgi_intercept.interceptor import RequestsInterceptor, UrllibInterceptor
1212

13-
from pyff.api import mkapp
13+
from pyff.api import mkapp
1414
from pyff.constants import config
1515
from pyff.test import SignerTestCase
1616
from pyff.test.test_pipeline import PipeLineTest
@@ -20,6 +20,7 @@ class PyFFAPITest(PipeLineTest):
2020
"""
2121
Runs twill tests using the wsgi-intercept
2222
"""
23+
2324
mdx = None
2425
mdx_template = None
2526
app = None
@@ -31,7 +32,7 @@ def setUpClass(cls):
3132
cls.templates = TemplateLookup(directories=[os.path.join(cls.datadir, 'mdx')])
3233
with tempfile.TemporaryDirectory() as td:
3334
cls.tmp = td
34-
cls.mdx = os.path.join(td,'mdx.fd')
35+
cls.mdx = os.path.join(td, 'mdx.fd')
3536
cls.mdx_template = cls.templates.get_template('mdx.fd')
3637
with open(cls.mdx, "w+") as fd:
3738
fd.write(cls.mdx_template.render(ctx=cls))
@@ -132,7 +133,7 @@ def test_load_and_query(self):
132133
data = r.json()
133134
assert data is not None and len(data) == 1
134135
info = data[0]
135-
assert type(info) == dict
136+
assert info is dict
136137
assert info['title'] == 'NORDUnet'
137138
assert 'nordu.net' in info['scope']
138139

@@ -141,7 +142,10 @@ def test_load_and_query(self):
141142
assert r.status_code == 200
142143
data = r.json()
143144
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+
145149

146150
class PyFFAPITestResources(PipeLineTest):
147151
"""

0 commit comments

Comments
 (0)