Skip to content

Commit

Permalink
✅ [#74] Update test that was accessing certificate the old way
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Jul 19, 2024
1 parent fc36f02 commit c65573b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_eherkenning_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from unittest.mock import patch

from django.conf import settings
from django.test import RequestFactory, TestCase, override_settings
from django.test import TestCase, override_settings
from django.urls import reverse
from django.utils import timezone

Expand All @@ -14,9 +14,7 @@
from lxml import etree
from onelogin.saml2.utils import OneLogin_Saml2_Utils

from digid_eherkenning.choices import AssuranceLevels
from digid_eherkenning.models import EherkenningConfiguration
from digid_eherkenning.views import eHerkenningLoginView

from .project.models import User
from .utils import create_example_artifact, get_saml_element
Expand Down Expand Up @@ -146,7 +144,8 @@ def setUp(self):

config = EherkenningConfiguration.get_solo()

with config.certificate.public_certificate.open("r") as cert_file:
current_cert, _ = config._select_certificates()
with current_cert.public_certificate.open("r") as cert_file:
cert = cert_file.read()

encrypted_attribute = OneLogin_Saml2_Utils.generate_name_id(
Expand Down

0 comments on commit c65573b

Please sign in to comment.