Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 4b236ec

Browse files
committed
Use pytest.raises
1 parent e48db51 commit 4b236ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/access_codes/test_access_codes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ def test_access_codes_create_wait_for_code(seam: Seam):
4949
assert created_access_code.name == "Test code"
5050
assert created_access_code.code == "4445"
5151

52-
with self.assertRaises(RuntimeException) as e:
52+
with pytest.raises(RuntimeError) as excinfo:
5353
seam.access_codes.create(
5454
some_device.device_id, "Test code", "4445", wait_for_code=True, starts_at="3001-01-01", ends_at="3001-01-03"
5555
)
56+
assert "status is unknown" in str(excinfo.value)

0 commit comments

Comments
 (0)