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

Refactor get_assignments tests to exercise all parameters independently and combined #6437

Merged

Conversation

marcospri
Copy link
Member

@marcospri marcospri commented Jul 9, 2024

Ideally this would help detect issues like: #6429 (comment)

@marcospri marcospri changed the title Refactor get_assignments tests to exercise all parameters independent… Refactor get_assignments tests to exercise all parameters independently and combined Jul 9, 2024

query = svc.get_assignments(**query_parameters)

if not query_parameters:
Copy link
Member Author

@marcospri marcospri Jul 9, 2024

Choose a reason for hiding this comment

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

Improve the assert here, check it matches the assignment created in this test (assignment) + the other ones in the DB (with_assignment_noise).

tool_consumer_instance_guid="noise_tool_consumer_instance_guid",
resource_link_id=assignment.resource_link_id,
)
return [
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixture now not only creates the assignments but returns them. I reckon all fixtures should return the values they create even if not immediately used.

@marcospri marcospri force-pushed the api-filter-assignments-by-assignments branch from 21604e6 to a05f95c Compare July 9, 2024 12:36
@marcospri marcospri marked this pull request as draft July 9, 2024 13:22
@marcospri marcospri force-pushed the api-filter-assignments-by-assignments branch from a05f95c to a678126 Compare July 9, 2024 13:23
@marcospri marcospri force-pushed the get-assignments-test-refactor branch from 2ce6a89 to 9236174 Compare July 10, 2024 07:16
@marcospri marcospri force-pushed the get-assignments-test-refactor branch from 9236174 to 0472e36 Compare July 10, 2024 07:18
@marcospri marcospri marked this pull request as ready for review July 10, 2024 07:25
@marcospri marcospri requested a review from robertknight July 10, 2024 07:25
@marcospri marcospri merged commit 981aa5a into api-filter-assignments-by-assignments Jul 10, 2024
9 checks passed
@marcospri marcospri deleted the get-assignments-test-refactor branch July 10, 2024 14:36
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.

1 participant