@@ -25,64 +25,22 @@ def options():
2525 return VirtualAuthenticatorOptions ()
2626
2727
28- def test_set_transport (options ):
29- options .transport = VirtualAuthenticatorOptions .Transport .USB
30- assert options .transport == VirtualAuthenticatorOptions .Transport .USB .value
31-
32-
33- def test_get_transport (options ):
34- options ._transport = VirtualAuthenticatorOptions .Transport .NFC
35- assert options .transport == VirtualAuthenticatorOptions .Transport .NFC .value
36-
37-
38- def test_set_protocol (options ):
39- options .protocol = VirtualAuthenticatorOptions .Protocol .U2F
40- assert options .protocol == VirtualAuthenticatorOptions .Protocol .U2F .value
41-
42-
43- def test_get_protocol (options ):
44- options ._protocol = VirtualAuthenticatorOptions .Protocol .CTAP2
45- assert options .protocol == VirtualAuthenticatorOptions .Protocol .CTAP2 .value
46-
47-
48- def test_set_has_resident_key (options ):
49- options .has_resident_key = True
50- assert options .has_resident_key is True
51-
52-
53- def test_get_has_resident_key (options ):
54- options ._has_resident_key = False
55- assert options .has_resident_key is False
56-
57-
58- def test_set_has_user_verification (options ):
59- options .has_user_verification = True
60- assert options .has_user_verification is True
61-
62-
63- def test_get_has_user_verification (options ):
64- options ._has_user_verification = False
65- assert options .has_user_verification is False
66-
67-
68- def test_set_is_user_consenting (options ):
69- options .is_user_consenting = True
70- assert options .is_user_consenting is True
71-
72-
73- def test_get_is_user_consenting (options ):
74- options ._is_user_consenting = False
75- assert options .is_user_consenting is False
76-
77-
78- def test_set_is_user_verified (options ):
79- options .is_user_verified = True
80- assert options .is_user_verified is True
81-
82-
83- def test_get_is_user_verified (options ):
84- options ._is_user_verified = False
85- assert options .is_user_verified is False
28+ def test_bespoke_options_for_virtual_authenticator ():
29+ va = VirtualAuthenticatorOptions (
30+ protocol = "ctap1/u2f" ,
31+ transport = "ble" ,
32+ has_resident_key = True ,
33+ has_user_verification = True ,
34+ is_user_consenting = False ,
35+ is_user_verified = True
36+ ).to_dict () == {
37+ "protocol" : "ctap1/u2f" ,
38+ "transport" : "ble" ,
39+ "hasResidentKey" : True ,
40+ "hasUserVerification" : True ,
41+ "isUserConsenting" : False ,
42+ "isUserVerified" : True
43+ }
8644
8745
8846def test_to_dict_with_defaults (options ):
0 commit comments