From 2c749223714c4d7815ca6b2d1888169a864a0fec Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Tue, 18 Jun 2019 19:16:58 +0200 Subject: Tests: correct the model getting Signed-off-by: Szczepan Zalega --- unittest/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unittest/conftest.py b/unittest/conftest.py index a9f46c6..7a4e2a2 100644 --- a/unittest/conftest.py +++ b/unittest/conftest.py @@ -130,7 +130,8 @@ def get_library(request, allow_offline=False): assert nk_login != 0 # returns 0 if not connected or wrong model or 1 when connected global device_type firmware_version = C.NK_get_minor_firmware_version() - model = 'P' if firmware_version < 20 else 'S' + model = C.NK_get_device_model() + model = 'P' if model == 1 else 'S' if model == 2 else 'U' device_type = (model, firmware_version) print('Connected device: {} {}'.format(model, firmware_version)) -- cgit v1.2.3