summaryrefslogtreecommitdiff
path: root/tests/test_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_server.py')
-rw-r--r--tests/test_server.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_server.py b/tests/test_server.py
index 3099cf7..41a6aea 100644
--- a/tests/test_server.py
+++ b/tests/test_server.py
@@ -75,6 +75,8 @@ def test_state_validation_md5() -> None:
75 assert state.validated is False 75 assert state.validated is False
76 assert state.response_validates('0x9e876134d90499dd') is True 76 assert state.response_validates('0x9e876134d90499dd') is True
77 assert state.response_validates('INCH SEA ANNE LONG AHEM TOUR') is True 77 assert state.response_validates('INCH SEA ANNE LONG AHEM TOUR') is True
78 response = otp2289.OTPResponse(bytes.fromhex('9e876134d90499dd'))
79 assert state.response_validates(response) is True
78 assert state.ot_hex == '7965e05436f5029f' 80 assert state.ot_hex == '7965e05436f5029f'
79 assert state.validated is True 81 assert state.validated is True
80 82
@@ -87,6 +89,8 @@ def test_state_validation_sha1() -> None:
87 assert state.validated is False 89 assert state.validated is False
88 assert state.response_validates('0xbb9e6ae1979d8ff4') is True 90 assert state.response_validates('0xbb9e6ae1979d8ff4') is True
89 assert state.response_validates('MILT VARY MAST OK SEES WENT') is True 91 assert state.response_validates('MILT VARY MAST OK SEES WENT') is True
92 response = otp2289.OTPResponse(bytes.fromhex('bb9e6ae1979d8ff4'))
93 assert state.response_validates(response) is True
90 assert state.ot_hex == '63d936639734385b' 94 assert state.ot_hex == '63d936639734385b'
91 assert state.validated is True 95 assert state.validated is True
92 96