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

chore: restrict external HTTP calls in tests #3866

Merged
merged 3 commits into from May 7, 2024

Conversation

khvn26
Copy link
Member

@khvn26 khvn26 commented May 1, 2024

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

This PR adds a global restriction of HTTP requests in unit tests.
When an external HTTP call is detected, the test trying to perform it fails with a notice/instruction to developers.

This PR will also add fixes to the current offending tests.

How did you test this code?

Ran the test suite.

@khvn26 khvn26 requested review from a team and matthewelwell and removed request for a team May 1, 2024 11:18
Copy link

vercel bot commented May 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2024 1:45pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2024 1:45pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2024 1:45pm

Copy link
Contributor

github-actions bot commented May 1, 2024

Uffizzi Preview deployment-51096 was deleted.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 90.90909% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 95.87%. Comparing base (53e728a) to head (9001537).

Files Patch % Lines
api/conftest.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3866      +/-   ##
==========================================
- Coverage   95.87%   95.87%   -0.01%     
==========================================
  Files        1133     1133              
  Lines       35873    35883      +10     
==========================================
+ Hits        34393    34402       +9     
- Misses       1480     1481       +1     

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

@khvn26
Copy link
Member Author

khvn26 commented May 3, 2024

@matthewelwell This is now ready for review.

@khvn26 khvn26 requested a review from matthewelwell May 7, 2024 13:33
@khvn26 khvn26 added this pull request to the merge queue May 7, 2024
Merged via the queue into main with commit b66747f May 7, 2024
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants