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 tests to pass without cassettes #137

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

agateau-gg
Copy link
Collaborator

Our API no longer reports "Filenames" policy breaks. As a result the test_content_scan() and test_multi_content_scan() tests were failing.

This PR updates the tests to match the new API behavior.

- Remove VCR decorator: the code uses a VCR `with` block.

- Do not wrap the wall test in the VCR `with` block: only wrap the call to
  `client.multi_content_scan()`

- Early return if `expected` is None

- Load `expected` into `example_dict` only once
`.env` policy breaks are no longer reported by the API. Remove the code
testing this.
@agateau-gg agateau-gg added the skip-changelog No changelog check in the CI label Feb 24, 2025
@agateau-gg agateau-gg requested a review from a team as a code owner February 24, 2025 13:57
@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.73%. Comparing base (445f190) to head (a7661ea).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #137   +/-   ##
=======================================
  Coverage   95.73%   95.73%           
=======================================
  Files           5        5           
  Lines        1196     1196           
=======================================
  Hits         1145     1145           
  Misses         51       51           
Flag Coverage Δ
unittests 95.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No changelog check in the CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants