1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-29 02:48:18 +00:00

test: fix client.reset_debug_features for codec

[no changelog]
This commit is contained in:
M1nd3r 2024-11-27 11:28:17 +01:00
parent 60877e3bd4
commit b778385201
2 changed files with 6 additions and 6 deletions

View File

@ -1301,7 +1301,7 @@ class TrezorClientDebugLink(TrezorClient):
self.transport = transport
self.ui: DebugUI = DebugUI(self.debug)
self.reset_debug_features()
self.reset_debug_features(new_management_session=True)
self.sync_responses()
# So that we can choose right screenshotting logic (T1 vs TT)
# and know the supported debug capabilities
@ -1324,7 +1324,7 @@ class TrezorClientDebugLink(TrezorClient):
def get_new_client(self) -> TrezorClientDebugLink:
return TrezorClientDebugLink(self.transport, self.debug.allow_interactions)
def reset_debug_features(self) -> None:
def reset_debug_features(self, new_management_session: bool = False) -> None:
"""
Prepare the debugging client for a new testcase.
@ -1339,8 +1339,8 @@ class TrezorClientDebugLink(TrezorClient):
t.Type[protobuf.MessageType],
t.Callable[[protobuf.MessageType], protobuf.MessageType] | None,
] = {}
self._management_session = self.get_management_session(new_session=True)
if new_management_session:
self._management_session = self.get_management_session(new_session=True)
@property
def button_callback(self):
@ -1531,7 +1531,7 @@ class TrezorClientDebugLink(TrezorClient):
else:
input_flow = None
self.reset_debug_features()
self.reset_debug_features(new_management_session=False)
if exc_type is None:
# If no other exception was raised, evaluate missed responses

View File

@ -291,7 +291,7 @@ def client(
test_ui = request.config.getoption("ui")
_raw_client.reset_debug_features()
_raw_client.reset_debug_features(new_management_session=True)
_raw_client.open()
if isinstance(_raw_client.protocol, ProtocolV1):
try: