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 18
18
from saml2 .samlp import response_from_string
19
19
from saml2 .s_utils import factory , do_attribute_statement
20
20
21
+ import pytest
21
22
from py .test import raises
22
23
23
24
from pathutils import full_path
@@ -67,7 +68,10 @@ def _eq(l1, l2):
67
68
wKe3ACFXBvqGQN0IbcH49hu0FKhYFM/GPDJcIHFBsiyMBXChpye9vBaTNEBCtU3K
68
69
jjyG0hRT2mAQ9h+bkPmOvlEo/aH0xR68Z9hw4PF13w=="""
69
70
70
- from pyasn1 .codec .der import decoder
71
+ try :
72
+ from pyasn1 .codec .der import decoder
73
+ except ImportError :
74
+ decoder = None
71
75
72
76
73
77
def test_cert_from_instance_1 ():
@@ -80,6 +84,8 @@ def test_cert_from_instance_1():
80
84
assert certs [0 ] == CERT1
81
85
82
86
87
+ @pytest .mark .skipif (not decoder ,
88
+ reason = "pyasn1 is not installed" )
83
89
def test_cert_from_instance_ssp ():
84
90
xml_response = open (SIMPLE_SAML_PHP_RESPONSE ).read ()
85
91
response = samlp .response_from_string (xml_response )
You can’t perform that action at this time.
0 commit comments