Skip to content

Commit

Permalink
fix(test): correct deploy module test and decorator
Browse files Browse the repository at this point in the history
- Add @contextmanager decorator to deploy_module method
- Rename test_credential_deployment to test_deploy_module
- Update test to use deploy_module instead of credential_deployment
- Remove unused snapshot images

Aligns test naming and implementation with actual functionality being tested.
  • Loading branch information
keiff3r committed Dec 10, 2024
1 parent d8a2d85 commit 2f5611f
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/application_client/boilerplate_command_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ def credential_deployment_part_3(
print("km--------sent new or existing", response)
yield response

@contextmanager
def deploy_module(
self,
path: str,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_deploy_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


@pytest.mark.active_test_scope
def test_credential_deployment(
def test_deploy_module(
backend, firmware, navigator, test_name, default_screenshot_path
):
client = BoilerplateCommandSender(backend)
Expand All @@ -26,7 +26,7 @@ def test_credential_deployment(
version = 1
source = b"source"

with client.credential_deployment(
with client.deploy_module(
path=path, header_and_type=header_and_type, version=version, source=source
):
navigate_until_text_and_compare(
Expand Down

0 comments on commit 2f5611f

Please sign in to comment.