From f516d127c861b119655b838c86e6753356c3e377 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Wed, 28 Jun 2023 20:10:57 -0700 Subject: [PATCH] Update client tests to expect "all" as a valid new content type --- tests/test_client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index d74b4f2d..57ea08de 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -34,7 +34,7 @@ def test_search_with_invalid_content_type(client): # ---------------------------------------------------------------------------------------------------- def test_search_with_valid_content_type(client): - for content_type in ["org", "markdown", "ledger", "image", "music", "pdf", "plugin1"]: + for content_type in ["all", "org", "markdown", "ledger", "image", "music", "pdf", "plugin1"]: # Act response = client.get(f"/api/search?q=random&t={content_type}") # Assert @@ -84,7 +84,7 @@ def test_get_configured_types_via_api(client): # Assert assert response.status_code == 200 - assert response.json() == ["org", "image", "plugin1"] + assert response.json() == ["all", "org", "image", "plugin1"] # ---------------------------------------------------------------------------------------------------- @@ -102,7 +102,7 @@ def test_get_configured_types_with_only_plugin_content_config(content_config): # Assert assert response.status_code == 200 - assert response.json() == ["plugin1"] + assert response.json() == ["all", "plugin1"] # ---------------------------------------------------------------------------------------------------- @@ -137,7 +137,7 @@ def test_get_configured_types_with_no_content_config(): # Assert assert response.status_code == 200 - assert response.json() == [] + assert response.json() == ["all"] # ----------------------------------------------------------------------------------------------------