chore: keycard env set separately for keycard tests only

This commit is contained in:
Valentina Novgorodtceva 2024-07-12 16:44:29 +07:00 committed by Anastasiya
parent d814ec12ef
commit 2a4e341f9d
4 changed files with 10 additions and 1 deletions

View File

@ -5,3 +5,4 @@ LOG_LEVEL = logging.getLevelName(os.getenv('LOG_LEVEL', 'INFO'))
UPDATE_VP_ON_FAIL = False UPDATE_VP_ON_FAIL = False
DEV_BUILD = False DEV_BUILD = False
AUT_PATH = os.getenv('AUT_PATH') AUT_PATH = os.getenv('AUT_PATH')
os.environ['STATUS_RUNTIME_USE_MOCKED_KEYCARD'] = 'False'

View File

@ -1,6 +1,8 @@
import logging import logging
import os
LOG_LEVEL = logging.DEBUG LOG_LEVEL = logging.DEBUG
DEV_BUILD = False DEV_BUILD = False
AUT_PATH = "path to the application (.app or .AppImage)" AUT_PATH = "path to the application (.app or .AppImage)"
os.environ['STATUS_RUNTIME_USE_MOCKED_KEYCARD'] = 'False'

View File

@ -44,7 +44,8 @@ def setup_function_scope(
caplog, caplog,
generate_test_data, generate_test_data,
check_result, check_result,
application_logs application_logs,
keycard_controller
): ):
# FIXME: broken due to KeyError: <_pytest.stash.StashKey object at 0x7fd1ba6d78c0> # FIXME: broken due to KeyError: <_pytest.stash.StashKey object at 0x7fd1ba6d78c0>
# caplog.set_level(configs.LOG_LEVEL) # caplog.set_level(configs.LOG_LEVEL)

View File

@ -1,4 +1,5 @@
import allure import allure
import os
import pytest import pytest
import logging import logging
import configs import configs
@ -18,6 +19,10 @@ def options(request):
return request.param return request.param
return '' return ''
@pytest.fixture
def keycard_controller(request):
if 'settings_keycard' in str(getattr(request, 'fspath')):
os.environ['STATUS_RUNTIME_USE_MOCKED_KEYCARD'] = 'True'
@pytest.fixture @pytest.fixture
def application_logs(): def application_logs():