Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Conversation

@seer-by-sentry
Copy link

This PR adds tests for #528

Commits:

  • Add unit tests for network_upload command
  • Update CLI command list test to include network-upload

…sts/commands/` directory. The file contains unit tests for the `network_upload` command. Here's a breakdown of the tests:

1. We import necessary modules and mock the `NetworkFinder` and `UploadSender` classes.
2. We create test fixtures for the mocked classes.
3. We define four test functions:
   a. `test_network_upload_dry_run`: Tests the dry run functionality.
   b. `test_network_upload_success`: Tests a successful network upload.
   c. `test_network_upload_failure`: Tests a failed network upload.
   d. `test_network_upload_no_files_found`: Tests the case when no files are found in the network.

Each test function uses the `CliRunner` to invoke the `network_upload` command with various arguments and checks the output and behavior of the command.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants