From b94d61b2f3c446c46ac2f660d954841d740782f5 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 9 Nov 2016 19:20:51 +0100 Subject: Detect Pro 0.8 Signed-off-by: Szczepan Zalega --- unittest/misc.py | 4 ++++ unittest/test_pro.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'unittest') diff --git a/unittest/misc.py b/unittest/misc.py index b45436d..8296814 100644 --- a/unittest/misc.py +++ b/unittest/misc.py @@ -31,6 +31,10 @@ def is_pro_rtm_07(C): firmware = get_firmware_version_from_status(C) return '07 00' in firmware +def is_pro_rtm_08(C): + firmware = get_firmware_version_from_status(C) + return '08 00' in firmware + def is_storage(C): """ diff --git a/unittest/test_pro.py b/unittest/test_pro.py index 6ab2af9..c7772d6 100644 --- a/unittest/test_pro.py +++ b/unittest/test_pro.py @@ -2,7 +2,7 @@ import pytest from constants import DefaultPasswords, DeviceErrorCode, RFC_SECRET from misc import ffi, gs, wait, cast_pointer_to_tuple -from misc import is_pro_rtm_07, is_storage +from misc import is_pro_rtm_07, is_pro_rtm_08, is_storage def test_enable_password_safe(C): assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK @@ -61,7 +61,7 @@ def test_password_safe_slot_status(C): def test_issue_device_locks_on_second_key_generation_in_sequence(C): - if is_pro_rtm_07(C): + if is_pro_rtm_07(C) or is_pro_rtm_08(C): pytest.skip("issue to register: device locks up " "after below commands sequence (reinsertion fixes), skipping for now") assert C.NK_build_aes_key(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK -- cgit v1.2.3