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

fix(test_download_submission_autoresume): don't hard-code mock's Content-Length header #2225

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

cfm
Copy link
Member

@cfm cfm commented Sep 16, 2024

Status

Ready for review

Description

Fixes #2223 by teaching test_download_submission_autoresume()'s StubbedStderr mock to report the actual Content-Length header of the pre-mocked response. Otherwise, the test will fail if the pre-mocked response is smaller than the hard-coded value.

Test Plan

  1. Start a SecureDrop development server with no LOADDATA_ARGS: just make dev.
  2. make regenerate-sdk-cassettes succeeds.

…tent-Length" header

The mock will cause the test to fail if the pre-mocked response is
smaller than the indicated "Content-Length".
@cfm cfm added the tests label Sep 16, 2024
@cfm cfm requested a review from a team as a code owner September 16, 2024 13:31
Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one question though. Feel free to merge if it doesn't need addressing.

client/tests/sdk/test_api.py Show resolved Hide resolved
@cfm
Copy link
Member Author

cfm commented Sep 17, 2024

Thanks, @legoktm.

@cfm cfm added this pull request to the merge queue Sep 17, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 17, 2024
@cfm cfm added this pull request to the merge queue Sep 17, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 17, 2024
@legoktm legoktm added this pull request to the merge queue Sep 17, 2024
Merged via the queue into main with commit 36671f2 Sep 17, 2024
58 checks passed
@legoktm legoktm deleted the fix-regenerate-sdk-cassettes branch September 17, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

StubbedStderr in TestAPI.test_download_submission_autoresume() breaks make regenerate-sdk-cassettes
2 participants