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

Replace broken httpretty tests with mock (SC-324) #973

Merged
merged 3 commits into from
Aug 13, 2021

Conversation

TheRealFalcon
Copy link
Member

Proposed Commit Message

Replace broken httpretty tests with mock

Certain versions of python/httpretty don't work correctly using https
URIs. #960 recently added httpretty tests using https. This commit
replaces the httpretty tests that were failing on https with mocks of
readurl instead.

Additional Context

This was found by running packages/bddeb on main.

The root cause has been open for 6 years now (and has affected other parts of the code base), so we may want to migrate to responses at some point in the future.

Test Steps

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

Certain versions of python/httpretty don't work correctly using https
URIs. canonical#960 recently added httpretty tests using https. This commit
replaces the httpretty tests that were failing on https with mocks of
readurl instead.
@TheRealFalcon TheRealFalcon changed the title Replace broken httpretty tests with mock Replace broken httpretty tests with mock (SC-324) Aug 12, 2021
Copy link
Contributor

@paride paride left a comment

Choose a reason for hiding this comment

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

The code LGTM and I verified that the tests pass with this merged.

Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

LGTM!

@blackboxsw blackboxsw merged commit 1c3b10b into canonical:main Aug 13, 2021
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.

None yet

3 participants