diff --git a/tests/pico-fido/test_getinfo.py b/tests/pico-fido/test_000_getinfo.py similarity index 100% rename from tests/pico-fido/test_getinfo.py rename to tests/pico-fido/test_000_getinfo.py diff --git a/tests/pico-fido/test_pin.py b/tests/pico-fido/test_010_pin.py similarity index 98% rename from tests/pico-fido/test_pin.py rename to tests/pico-fido/test_010_pin.py index 278798b..0e947f4 100644 --- a/tests/pico-fido/test_pin.py +++ b/tests/pico-fido/test_010_pin.py @@ -34,9 +34,9 @@ def test_lockout(device, resetdevice, client_pin): pin_token = client_pin.get_pin_token(pin) for i in range(1, 10): - err = CtapError.ERR.PIN_INVALID - if i in (3, 6): - err = CtapError.ERR.PIN_AUTH_BLOCKED + err = [CtapError.ERR.PIN_INVALID] + if 3 <= i <= 7: + err = [CtapError.ERR.PIN_AUTH_BLOCKED] elif i >= 8: err = [CtapError.ERR.PIN_BLOCKED, CtapError.ERR.PIN_INVALID] diff --git a/tests/pico-fido/test_register.py b/tests/pico-fido/test_020_register.py similarity index 98% rename from tests/pico-fido/test_register.py rename to tests/pico-fido/test_020_register.py index 26b6984..76cf631 100644 --- a/tests/pico-fido/test_register.py +++ b/tests/pico-fido/test_020_register.py @@ -180,5 +180,6 @@ def test_exclude_list_excluded(device): assert e.value.code == CtapError.ERR.CREDENTIAL_EXCLUDED -def test_unknown_option(resetdevice): - resetdevice.MC(options={"unknown": False}) +def test_unknown_option(device): + device.reset() + device.MC(options={"unknown": False}) diff --git a/tests/pico-fido/test_authenticate.py b/tests/pico-fido/test_021_authenticate.py similarity index 100% rename from tests/pico-fido/test_authenticate.py rename to tests/pico-fido/test_021_authenticate.py diff --git a/tests/pico-fido/test_discoverable.py b/tests/pico-fido/test_022_discoverable.py similarity index 100% rename from tests/pico-fido/test_discoverable.py rename to tests/pico-fido/test_022_discoverable.py diff --git a/tests/pico-fido/test_blob.py b/tests/pico-fido/test_031_blob.py similarity index 100% rename from tests/pico-fido/test_blob.py rename to tests/pico-fido/test_031_blob.py diff --git a/tests/pico-fido/test_credprotect.py b/tests/pico-fido/test_033_credprotect.py similarity index 98% rename from tests/pico-fido/test_credprotect.py rename to tests/pico-fido/test_033_credprotect.py index a775082..83e02c8 100644 --- a/tests/pico-fido/test_credprotect.py +++ b/tests/pico-fido/test_033_credprotect.py @@ -126,10 +126,7 @@ def test_credprotect_optional_and_list_works_no_uv(device, MCCredProtectOptional res1 = device.doGA(allow_list=allow_list)['res'].get_assertions()[0] assert res1.number_of_credentials in (None, 2) - results = [res1] - if res1.number_of_credentials == 2: - res2 = device.GNA()['res'] - results.append(res2) + results = device.doGA(allow_list=allow_list)['res'].get_assertions() # the required credProtect is not returned. for res in results: diff --git a/tests/pico-fido/test_hmac_secret.py b/tests/pico-fido/test_035_hmac_secret.py similarity index 100% rename from tests/pico-fido/test_hmac_secret.py rename to tests/pico-fido/test_035_hmac_secret.py diff --git a/tests/pico-fido/test_minpinlength.py b/tests/pico-fido/test_037_minpinlength.py similarity index 100% rename from tests/pico-fido/test_minpinlength.py rename to tests/pico-fido/test_037_minpinlength.py diff --git a/tests/pico-fido/test_cred_mgmt.py b/tests/pico-fido/test_040_cred_mgmt.py similarity index 100% rename from tests/pico-fido/test_cred_mgmt.py rename to tests/pico-fido/test_040_cred_mgmt.py diff --git a/tests/pico-fido/test_ctap1_interop.py b/tests/pico-fido/test_051_ctap1_interop.py similarity index 100% rename from tests/pico-fido/test_ctap1_interop.py rename to tests/pico-fido/test_051_ctap1_interop.py diff --git a/tests/pico-fido/test_u2f.py b/tests/pico-fido/test_052_u2f.py similarity index 100% rename from tests/pico-fido/test_u2f.py rename to tests/pico-fido/test_052_u2f.py diff --git a/tests/pico-fido/test_hid.py b/tests/pico-fido/test_055_hid.py similarity index 100% rename from tests/pico-fido/test_hid.py rename to tests/pico-fido/test_055_hid.py diff --git a/tests/pico-fido/test_oath.py b/tests/pico-fido/test_070_oath.py similarity index 100% rename from tests/pico-fido/test_oath.py rename to tests/pico-fido/test_070_oath.py