Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(api): change the inserted_at.lte unittest #6403

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions api/src/backend/api/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1447,12 +1447,8 @@ def test_provider_group_clear_relationships(
"id": str(group.id),
"type": "provider-groups",
"relationships": {
"providers": {
"data": [] # Removing all providers
},
"roles": {
"data": [] # Removing all roles
},
"providers": {"data": []}, # Removing all providers
"roles": {"data": []}, # Removing all roles
},
}
}
Expand Down Expand Up @@ -2427,7 +2423,11 @@ def test_findings_list_include(
("inserted_at", "2024-01-01", 0),
("inserted_at.date", "2024-01-01", 0),
("inserted_at.gte", "2024-01-01", 2),
("inserted_at.lte", "2024-12-31", 2),
(
"inserted_at.lte",
"2028-12-31",
2,
), # TODO: To avoid having to modify this value and to ensure that the tests always work, we should set the time before the fixtures are inserted
("updated_at.lte", "2024-01-01", 0),
("resource_type.icontains", "prowler", 2),
# full text search on finding
Expand Down Expand Up @@ -3564,12 +3564,8 @@ def test_role_clear_relationships(self, authenticated_client, roles_fixture):
"id": str(role.id),
"type": "roles",
"relationships": {
"users": {
"data": [] # Clearing all users
},
"provider_groups": {
"data": [] # Clearing all provider groups
},
"users": {"data": []}, # Clearing all users
"provider_groups": {"data": []}, # Clearing all provider groups
},
}
}
Expand Down
Loading