Skip to content

Commit

Permalink
⚰️ [open-formulieren/open-forms#3969] Remove obsolete test
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Mar 22, 2024
1 parent fc9aaa2 commit 2bb6d0b
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions tests/test_eherkenning_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,33 +107,6 @@ def test_login(self, uuid_mock):
).decode("utf-8"),
)

def test_login_views_can_override_minimum_loa(self):
class CustomLoginView(eHerkenningLoginView):
def get_level_of_assurance(self):
return (
AssuranceLevels.high
if "special" in self.request.GET.get("next")
else AssuranceLevels.middle
)

request = RequestFactory().get(reverse("eherkenning:login") + "?next=/special")

response = CustomLoginView.as_view()(request)

saml_request = b64decode(
response.context_data["form"].initial["SAMLRequest"].encode("utf-8")
)
tree = etree.fromstring(saml_request)
auth_context_class_ref = tree.xpath(
"samlp:RequestedAuthnContext[@Comparison='minimum']/saml:AuthnContextClassRef",
namespaces={
"samlp": "urn:oasis:names:tc:SAML:2.0:protocol",
"saml": "urn:oasis:names:tc:SAML:2.0:assertion",
},
)[0]

self.assertEqual(auth_context_class_ref.text, AssuranceLevels.high.value)

@freeze_time("2020-04-09T08:31:46Z")
@patch("onelogin.saml2.utils.uuid4")
def test_login_with_attribute_consuming_service_index(self, uuid_mock):
Expand Down

0 comments on commit 2bb6d0b

Please sign in to comment.