Skip to content

Commit e393022

Browse files
committed
Format code
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 2b55648 commit e393022

File tree

2 files changed

+44
-39
lines changed

2 files changed

+44
-39
lines changed

src/saml2/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ def session_info(self):
11211121
raise StatusInvalidAuthnResponseStatement(
11221122
"The Authn Response Statement is not valid"
11231123
)
1124-
1124+
11251125
def __str__(self):
11261126
return self.xmlstr
11271127

tests/test_41_response.py

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -48,37 +48,37 @@ def setup_class(self):
4848

4949
self._resp_ = server.create_authn_response(
5050
IDENTITY,
51-
"id12", # in_response_to
52-
"http://lingon.catalogix.se:8087/",
53-
# consumer_url
54-
"urn:mace:example.com:saml:roland:sp",
55-
# sp_entity_id
56-
name_id=name_id)
51+
in_response_to="id12",
52+
destination="http://lingon.catalogix.se:8087/",
53+
sp_entity_id="urn:mace:example.com:saml:roland:sp",
54+
name_id=name_id,
55+
)
5756

5857
self._sign_resp_ = server.create_authn_response(
5958
IDENTITY,
60-
"id12", # in_response_to
61-
"http://lingon.catalogix.se:8087/", # consumer_url
62-
"urn:mace:example.com:saml:roland:sp", # sp_entity_id
59+
in_response_to="id12",
60+
destination="http://lingon.catalogix.se:8087/",
61+
sp_entity_id="urn:mace:example.com:saml:roland:sp",
6362
name_id=name_id,
64-
sign_assertion=True)
63+
sign_assertion=True,
64+
)
6565

6666
self._resp_authn = server.create_authn_response(
6767
IDENTITY,
68-
"id12", # in_response_to
69-
"http://lingon.catalogix.se:8087/", # consumer_url
70-
"urn:mace:example.com:saml:roland:sp", # sp_entity_id
68+
in_response_to="id12",
69+
destination="http://lingon.catalogix.se:8087/",
70+
sp_entity_id="urn:mace:example.com:saml:roland:sp",
7171
name_id=name_id,
72-
authn=AUTHN)
72+
authn=AUTHN,
73+
)
7374

7475
self._resp_issuer_none = server.create_authn_response(
7576
IDENTITY,
76-
"id12", # in_response_to
77-
"http://lingon.catalogix.se:8087/",
78-
# consumer_url
79-
"urn:mace:example.com:saml:roland:sp",
80-
# sp_entity_id
81-
name_id=name_id)
77+
in_response_to="id12",
78+
destination="http://lingon.catalogix.se:8087/",
79+
sp_entity_id="urn:mace:example.com:saml:roland:sp",
80+
name_id=name_id,
81+
)
8282
self._resp_issuer_none.issuer = None
8383

8484
conf = config.SPConfig()
@@ -87,36 +87,41 @@ def setup_class(self):
8787

8888
def test_1(self):
8989
xml_response = ("%s" % (self._resp_,))
90-
resp = response_factory(xml_response, self.conf,
91-
return_addrs=[
92-
"http://lingon.catalogix.se:8087/"],
93-
outstanding_queries={
94-
"id12": "http://localhost:8088/sso"},
95-
timeslack=TIMESLACK, decode=False)
90+
resp = response_factory(
91+
xml_response, self.conf,
92+
return_addrs=["http://lingon.catalogix.se:8087/"],
93+
outstanding_queries={"id12": "http://localhost:8088/sso"},
94+
timeslack=TIMESLACK,
95+
decode=False,
96+
)
9697

9798
assert isinstance(resp, StatusResponse)
9899
assert isinstance(resp, AuthnResponse)
99100

100101
def test_2(self):
101102
xml_response = self._sign_resp_
102-
resp = response_factory(xml_response, self.conf,
103-
return_addrs=[
104-
"http://lingon.catalogix.se:8087/"],
105-
outstanding_queries={
106-
"id12": "http://localhost:8088/sso"},
107-
timeslack=TIMESLACK, decode=False)
103+
resp = response_factory(
104+
xml_response,
105+
self.conf,
106+
return_addrs=["http://lingon.catalogix.se:8087/"],
107+
outstanding_queries={"id12": "http://localhost:8088/sso"},
108+
timeslack=TIMESLACK,
109+
decode=False,
110+
)
108111

109112
assert isinstance(resp, StatusResponse)
110113
assert isinstance(resp, AuthnResponse)
111114

112115
def test_issuer_none(self):
113116
xml_response = ("%s" % (self._resp_issuer_none,))
114-
resp = response_factory(xml_response, self.conf,
115-
return_addrs=[
116-
"http://lingon.catalogix.se:8087/"],
117-
outstanding_queries={
118-
"id12": "http://localhost:8088/sso"},
119-
timeslack=TIMESLACK, decode=False)
117+
resp = response_factory(
118+
xml_response,
119+
self.conf,
120+
return_addrs=["http://lingon.catalogix.se:8087/"],
121+
outstanding_queries={"id12": "http://localhost:8088/sso"},
122+
timeslack=TIMESLACK,
123+
decode=False,
124+
)
120125

121126
assert isinstance(resp, StatusResponse)
122127
assert isinstance(resp, AuthnResponse)

0 commit comments

Comments
 (0)