Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RishiDiwanTT committed Sep 20, 2023
1 parent 24622e3 commit 625d27b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/core/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 625d27b

Please sign in to comment.