summaryrefslogtreecommitdiff
path: root/tests/test_32_cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_32_cache.py')
-rw-r--r--tests/test_32_cache.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_32_cache.py b/tests/test_32_cache.py
index 97442d87..1dc1b4eb 100644
--- a/tests/test_32_cache.py
+++ b/tests/test_32_cache.py
@@ -1,12 +1,15 @@
#!/usr/bin/env python
import time
-import py
+
+from pytest import raises
+
from saml2.saml import NameID, NAMEID_FORMAT_TRANSIENT
from saml2.cache import Cache
from saml2.time_util import in_a_while, str_to_time
from saml2.ident import code
+
SESSION_INFO_PATTERN = {"ava": {}, "came from": "", "not_on_or_after": 0,
"issuer": "", "session_id": -1}
@@ -64,7 +67,8 @@ class TestClass:
def test_entities(self):
assert _eq(self.cache.entities(nid[0]), ["abcd", "bcde"])
- py.test.raises(Exception, "self.cache.entities('6666')")
+ with raises(Exception):
+ self.cache.entities('6666')
def test_remove_info(self):
self.cache.reset(nid[0], "bcde")