From 625d27bf5d52fd1e0ff15f7080d3b0530646ca3e Mon Sep 17 00:00:00 2001 From: Rishi Diwan Date: Wed, 20 Sep 2023 16:53:56 +0530 Subject: [PATCH] Test fixes --- tests/core/test_scripts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/core/test_scripts.py b/tests/core/test_scripts.py index 04403717b9..3c39849aa6 100644 --- a/tests/core/test_scripts.py +++ b/tests/core/test_scripts.py @@ -1832,6 +1832,7 @@ def test_no_presentation_ready_works( ): # This work is not presentation-ready. work = db.work(with_license_pool=True) + end_to_end_search_fixture.external_search_index.initialize_indices() work.presentation_ready = False script = MockWhereAreMyBooks( _db=db.session, search=end_to_end_search_fixture.external_search_index @@ -1850,6 +1851,7 @@ def test_no_delivery_mechanisms( ): # This work has a license pool, but no delivery mechanisms. work = db.work(with_license_pool=True) + end_to_end_search_fixture.external_search_index.initialize_indices() for lpdm in work.license_pools[0].delivery_mechanisms: db.session.delete(lpdm) self.check_explanation( @@ -1865,6 +1867,7 @@ def test_suppressed_pool( ): # This work has a license pool, but it's suppressed. work = db.work(with_license_pool=True) + end_to_end_search_fixture.external_search_index.initialize_indices() work.license_pools[0].suppressed = True self.check_explanation( suppressed=1, @@ -1879,6 +1882,7 @@ def test_no_licenses( ): # This work has a license pool, but no licenses owned. work = db.work(with_license_pool=True) + end_to_end_search_fixture.external_search_index.initialize_indices() work.license_pools[0].licenses_owned = 0 self.check_explanation( not_owned=1,