Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tests for PR#528 #535

Draft
wants to merge 1 commit into
base: trent/network-upload-start
Choose a base branch
from

Conversation

sentry-autofix[bot]
Copy link

This PR adds tests for #528

Commits:

  • Add unit tests for network_upload command

…ommands/` directory. The file contains unit tests for the `network_upload` command introduced in the diff. 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 these mocked classes to be used across multiple tests.
3. We implement four test functions:
   a. `test_network_upload_dry_run`: Tests the dry run functionality.
   b. `test_network_upload_no_files_found`: Tests the behavior when no files are found.
   c. `test_network_upload_success`: Tests a successful upload scenario.
   d. `test_network_upload_failure`: Tests a failed upload scenario.

These tests cover various aspects of the `network_upload` command, including its options, dry run behavior, file finding, and both successful and failed upload processes. We use the `click.testing.CliRunner` to simulate command invocations and assert the expected outputs and behaviors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants