Skip to content

Commit c35a20b

Browse files
committed
Fix formatting
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 0fc3ef3 commit c35a20b

File tree

4 files changed

+27
-30
lines changed

4 files changed

+27
-30
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ _build
1414
build/
1515
dist/
1616
.coverage
17-
venv/
17+
venv/

src/satosa/frontends/saml2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,4 +1210,3 @@ def _metadata_endpoint(self, context, co_name):
12101210
# authentication request dynamically create an IdP instance.
12111211
self.idp = self._create_co_virtual_idp(context, co_name=co_name)
12121212
return super()._metadata_endpoint(context=context);
1213-

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def sp_conf(cert_and_key):
6464

6565
@pytest.fixture
6666
def idp_conf(cert_and_key):
67-
idp_base = BASE_URL
67+
idp_base = "http://idp.example.com"
6868

6969
idpconfig = {
7070
"entityid": "{}/{}/proxy.xml".format(idp_base, "Saml2IDP"),

tests/satosa/frontends/test_saml2.py

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,14 @@ def test_acr_mapping_per_idp_in_authn_response(self, context, idp_conf, sp_conf,
298298
]
299299
)
300300
def test_respect_sp_entity_categories(
301-
self,
302-
context,
303-
entity_category,
304-
entity_category_module,
305-
expected_attributes,
306-
idp_conf,
307-
sp_conf,
308-
internal_response
301+
self,
302+
context,
303+
entity_category,
304+
entity_category_module,
305+
expected_attributes,
306+
idp_conf,
307+
sp_conf,
308+
internal_response
309309
):
310310
idp_metadata_str = create_metadata_from_config_dict(idp_conf)
311311
idp_conf["service"]["idp"]["policy"]["default"]["entity_categories"] = [entity_category_module]
@@ -365,7 +365,7 @@ def test_metadata_endpoint(self, context, idp_conf):
365365
assert idp_conf["entityid"] in resp.message
366366

367367
def test_custom_attribute_release_with_less_attributes_than_entity_category(
368-
self, context, idp_conf, sp_conf, internal_response
368+
self, context, idp_conf, sp_conf, internal_response
369369
):
370370
idp_metadata_str = create_metadata_from_config_dict(idp_conf)
371371
idp_conf["service"]["idp"]["policy"]["default"]["entity_categories"] = ["swamid"]
@@ -387,8 +387,8 @@ def test_custom_attribute_release_with_less_attributes_than_entity_category(
387387
internal_response.requester = sp_conf["entityid"]
388388
resp = self.get_auth_response(samlfrontend, context, internal_response, sp_conf, idp_metadata_str)
389389
assert len(resp.ava.keys()) == (
390-
len(expected_attributes)
391-
- len(custom_attributes[internal_response.auth_info.issuer][internal_response.requester]["exclude"])
390+
len(expected_attributes)
391+
- len(custom_attributes[internal_response.auth_info.issuer][internal_response.requester]["exclude"])
392392
)
393393

394394

@@ -442,7 +442,7 @@ class TestSAMLVirtualCoFrontend(TestSAMLFrontend):
442442
CO_O: ["Medium Energy Synchrotron Source"],
443443
CO_C: ["US"],
444444
CO_CO: ["United States"],
445-
CO_NOREDUORGACRONYM: ["MESS"]
445+
CO_NOREDUORGACRONYM: ["MESS"],
446446
}
447447
KEY_SSO = "single_sign_on_service"
448448

@@ -474,7 +474,7 @@ def frontend(self, idp_conf, sp_conf):
474474
conf = {
475475
"idp_config": idp_conf,
476476
"endpoints": ENDPOINTS,
477-
"collaborative_organizations": [collab_org]
477+
"collaborative_organizations": [collab_org],
478478
}
479479

480480
# Use a richer set of internal attributes than what is provided
@@ -652,42 +652,40 @@ def test_co_static_attributes(self, frontend, context, internal_response,
652652
class TestSubjectTypeToSamlNameIdFormat:
653653
def test_should_default_to_persistent(self):
654654
assert (
655-
subject_type_to_saml_nameid_format("unmatched")
656-
== NAMEID_FORMAT_PERSISTENT
655+
subject_type_to_saml_nameid_format("unmatched")
656+
== NAMEID_FORMAT_PERSISTENT
657657
)
658658

659659
def test_should_map_persistent(self):
660660
assert (
661-
subject_type_to_saml_nameid_format(NAMEID_FORMAT_PERSISTENT)
662-
== NAMEID_FORMAT_PERSISTENT
661+
subject_type_to_saml_nameid_format(NAMEID_FORMAT_PERSISTENT)
662+
== NAMEID_FORMAT_PERSISTENT
663663
)
664664

665665
def test_should_map_transient(self):
666666
assert (
667-
subject_type_to_saml_nameid_format(NAMEID_FORMAT_TRANSIENT)
668-
== NAMEID_FORMAT_TRANSIENT
667+
subject_type_to_saml_nameid_format(NAMEID_FORMAT_TRANSIENT)
668+
== NAMEID_FORMAT_TRANSIENT
669669
)
670670

671671
def test_should_map_emailaddress(self):
672672
assert (
673-
subject_type_to_saml_nameid_format(NAMEID_FORMAT_EMAILADDRESS)
674-
== NAMEID_FORMAT_EMAILADDRESS
673+
subject_type_to_saml_nameid_format(NAMEID_FORMAT_EMAILADDRESS)
674+
== NAMEID_FORMAT_EMAILADDRESS
675675
)
676676

677677
def test_should_map_unspecified(self):
678678
assert (
679-
subject_type_to_saml_nameid_format(NAMEID_FORMAT_UNSPECIFIED)
680-
== NAMEID_FORMAT_UNSPECIFIED
679+
subject_type_to_saml_nameid_format(NAMEID_FORMAT_UNSPECIFIED)
680+
== NAMEID_FORMAT_UNSPECIFIED
681681
)
682682

683683
def test_should_map_public(self):
684684
assert (
685-
subject_type_to_saml_nameid_format("public")
686-
== NAMEID_FORMAT_PERSISTENT
685+
subject_type_to_saml_nameid_format("public") == NAMEID_FORMAT_PERSISTENT
687686
)
688687

689688
def test_should_map_pairwise(self):
690689
assert (
691-
subject_type_to_saml_nameid_format("pairwise")
692-
== NAMEID_FORMAT_TRANSIENT
690+
subject_type_to_saml_nameid_format("pairwise") == NAMEID_FORMAT_TRANSIENT
693691
)

0 commit comments

Comments
 (0)