Skip to content

Conversation

@jooola
Copy link
Member

@jooola jooola commented Aug 14, 2025

Similar to #536 but focused on the resources clients.

Pass request_mock directly to the test functions to configure the mocked HTTP requests. We do not want to update/modify protected properties (the mock object) within the client class.

Allows us to move the location of the client request function (that is mocked) in the future, without breaking the tests.

This also starts adding typing information to the tests, which should open the door for linting our test code as well.

A lot of the diff is from search and replaces and breaking the test arguments onto multiple lines.

This is the second patch of a larger set.

Based on top of #536

@codecov
Copy link

codecov bot commented Aug 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.07%. Comparing base (d38772b) to head (72fa01a).
⚠️ Report is 48 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #537   +/-   ##
=======================================
  Coverage   96.07%   96.07%           
=======================================
  Files          64       64           
  Lines        2933     2933           
=======================================
  Hits         2818     2818           
  Misses        115      115           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from refactor-tests-use-request-mock-bound-models to main August 14, 2025 13:45
@jooola jooola force-pushed the refactor-tests-use-request-mock-clients branch from 22e5cce to 72fa01a Compare August 14, 2025 13:47
@jooola jooola merged commit 9096813 into main Aug 14, 2025
10 checks passed
@jooola jooola deleted the refactor-tests-use-request-mock-clients branch August 14, 2025 13:48
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.

3 participants