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: align backend response status with UI #4433

Merged
merged 9 commits into from
Dec 22, 2023
Prev Previous commit
Next Next commit
tests: covering new pending status
  • Loading branch information
frascuchon committed Dec 19, 2023
commit 18d3da2320dadc29b803b72f6a44ed3a2de3121d
6 changes: 3 additions & 3 deletions tests/unit/server/api/v1/test_list_dataset_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ async def test_list_dataset_records_with_metadata_filter(

@pytest.mark.skip(reason="Factory integration with search engine")
@pytest.mark.parametrize(
"response_status_filter", ["missing", "discarded", "submitted", "draft", ["submitted", "draft"]]
"response_status_filter", ["missing", "pending", "discarded", "submitted", "draft", ["submitted", "draft"]]
)
async def test_list_dataset_records_with_response_status_filter(
self,
Expand Down Expand Up @@ -1235,7 +1235,7 @@ async def test_list_current_user_dataset_records_with_metadata_filter(
)

@pytest.mark.skip(reason="Factory integration with search engine")
@pytest.mark.parametrize("response_status_filter", ["missing", "discarded", "submitted", "draft"])
@pytest.mark.parametrize("response_status_filter", ["missing", "pending", "discarded", "submitted", "draft"])
async def test_list_current_user_dataset_records_with_response_status_filter(
self, async_client: "AsyncClient", owner: "User", owner_auth_header: dict, response_status_filter: str
):
Expand Down Expand Up @@ -1269,7 +1269,7 @@ async def test_list_current_user_dataset_records_with_response_status_filter(

assert len(response_json["items"]) == num_responses_per_status

if response_status_filter == "missing":
if response_status_filter in ["missing", "pending"]:
assert all([len(record["responses"]) == 0 for record in response_json["items"]])
else:
assert all(
Expand Down