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

Test behavior of case search with multiple results #1354

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

swrichards
Copy link
Collaborator

This commit adds a simple test to ensure we cover the (expectedly) rare case when cases are found in multiple backends. We can't currently cover the error cases well because we silence all client errors. Ideally we'd test this without error-silencing and using VCR, but that's for a later iteration.

This commit adds a simple test to ensure we cover the
(expectedly) rare case when cases are found in multiple
backends. We can't currently cover the error cases well
because we silence all client errors. Ideally we'd test
this without error-silencing and using VCR, but that's
for a later iteration.
@swrichards swrichards marked this pull request as ready for review August 15, 2024 15:13
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.14%. Comparing base (da884ce) to head (0c39329).
Report is 9 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop    #1354    +/-   ##
=========================================
  Coverage    95.13%   95.14%            
=========================================
  Files          999      999            
  Lines        36617    36723   +106     
=========================================
+ Hits         34835    34939   +104     
- Misses        1782     1784     +2     

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

@swrichards swrichards requested a review from pi-sigma August 15, 2024 15:46
Copy link
Contributor

@pi-sigma pi-sigma left a comment

Choose a reason for hiding this comment

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

Minor suggestion regarding a hard-coded UUID, but I'll approve since we're planning to refactor these tests anyway.

reverse(
"cases:case_detail",
kwargs={
"object_id": "d8bbdeb7-770f-4ca9-b1ea-77b4730bf67d",
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a utility for extracting UUIDs from URLs to avoid hard-coding like this:

from open_inwoner.utils.test import uuid_from_url

"object_id": uuid_from_url(self.zaak1["url"])

@alextreme alextreme merged commit 746372e into develop Aug 15, 2024
18 checks passed
@alextreme alextreme deleted the tasks/2486-search-zaak-multiple-backend branch August 15, 2024 17:20
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.

4 participants