File: test_guid.py

package info (click to toggle)
pyscard 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,348 kB
  • sloc: python: 8,718; ansic: 1,971; makefile: 51; sh: 7
file content (31 lines) | stat: -rw-r--r-- 599 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# pylint: disable=missing-module-docstring
# pylint: disable=missing-function-docstring

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