Skip to content

Commit 1ffac81

Browse files
committed
Skip missing NameID test depending on pysaml2 version
Optional NameID needs pysaml2 v4.6.1 or higher Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 912e132 commit 1ffac81

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
package_dir={'': 'src'},
1717
install_requires=[
1818
"pyop",
19-
"pysaml2>=4.6.1",
19+
"pysaml2",
2020
"pycryptodomex",
2121
"requests",
2222
"PyYAML",

tests/satosa/backends/test_saml2.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
from urllib.parse import urlparse, parse_qs, parse_qsl
1111

1212
import pytest
13+
14+
import saml2
1315
from saml2 import BINDING_HTTP_REDIRECT
1416
from saml2.authn_context import PASSWORD
1517
from saml2.config import IdPConfig, SPConfig
@@ -189,6 +191,9 @@ def test_authn_response(self, context, idp_conf, sp_conf):
189191
self.assert_authn_response(internal_resp)
190192
assert self.samlbackend.name not in context.state
191193

194+
@pytest.mark.skipif(
195+
saml2.__version__ < '4.6.1',
196+
reason="Optional NameID needs pysaml2 v4.6.1 or higher")
192197
def test_authn_response_no_name_id(self, context, idp_conf, sp_conf):
193198
response_binding = BINDING_HTTP_REDIRECT
194199

0 commit comments

Comments
 (0)