From 5a6ab9cc85b16a0ae647905b652b8ec5854341ad Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Wed, 15 Nov 2023 00:17:44 -0800 Subject: [PATCH] Fix failing client tests --- tests/test_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_client.py b/tests/test_client.py index 8e909c54..15be49dd 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -173,7 +173,6 @@ def test_regenerate_with_github_fails_without_pat(client): # ---------------------------------------------------------------------------------------------------- @pytest.mark.django_db -@pytest.mark.skip(reason="Flaky test on parallel test runs") def test_get_configured_types_via_api(client, sample_org_data): # Act text_search.setup(OrgToEntries, sample_org_data, regenerate=False) @@ -204,6 +203,9 @@ def test_get_api_config_types(client, sample_org_data, default_user: KhojUser): def test_get_configured_types_with_no_content_config(fastapi_app: FastAPI): # Arrange state.anonymous_mode = True + if state.config and state.config.content_type: + state.config.content_type = None + state.search_models = configure_search_types() configure_routes(fastapi_app) client = TestClient(fastapi_app)