File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1818from saml2 .samlp import response_from_string
1919from saml2 .s_utils import factory , do_attribute_statement
2020
21+ import pytest
2122from py .test import raises
2223
2324from pathutils import full_path
@@ -67,7 +68,10 @@ def _eq(l1, l2):
6768wKe3ACFXBvqGQN0IbcH49hu0FKhYFM/GPDJcIHFBsiyMBXChpye9vBaTNEBCtU3K
6869jjyG0hRT2mAQ9h+bkPmOvlEo/aH0xR68Z9hw4PF13w=="""
6970
70- from pyasn1 .codec .der import decoder
71+ try :
72+ from pyasn1 .codec .der import decoder
73+ except ImportError :
74+ decoder = None
7175
7276
7377def test_cert_from_instance_1 ():
@@ -80,6 +84,8 @@ def test_cert_from_instance_1():
8084 assert certs [0 ] == CERT1
8185
8286
87+ @pytest .mark .skipif (not decoder ,
88+ reason = "pyasn1 is not installed" )
8389def test_cert_from_instance_ssp ():
8490 xml_response = open (SIMPLE_SAML_PHP_RESPONSE ).read ()
8591 response = samlp .response_from_string (xml_response )
You can’t perform that action at this time.
0 commit comments