Skip to content

Commit

Permalink
Feedback: Add testing of GUID conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtmckee authored and LudovicRousseau committed Sep 29, 2024
1 parent f9bd13d commit 4ea9ec1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/test_guid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from smartcard.guid import GUIDToStr, strToGUID


def test_roundtrip_string():
string = '{AD4F1667-EA75-4124-84D4-641B3B197C65}'
assert GUIDToStr(strToGUID(string)) == string


def test_roundtrip_list_of_ints():
list_of_ints = [
103, 22, 79, 173, 117, 234, 36, 65, 132, 212, 100, 27, 59, 25, 124, 101
]
assert strToGUID(GUIDToStr(list_of_ints)) == list_of_ints

0 comments on commit 4ea9ec1

Please sign in to comment.