Skip to content

Commit e21b79e

Browse files
committed
fixup according to comments
1 parent c1b2770 commit e21b79e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

readthedocs/search/tests/test_views.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,14 @@ def test_file_search_case_insensitive(self, client, project, case):
104104
def test_page_search_not_return_removed_page(self, client, project):
105105
"""Check removed page are not in the search index"""
106106
query = get_search_query_from_project_file(project_slug=project.slug)
107+
# Make a query to check it returns result
108+
result, _ = self._get_search_result(url=self.url, client=client,
109+
search_params={'q': query, 'type': 'file'})
110+
assert len(result) == 1
111+
107112
# Delete all the HTML files of the project
108-
p = HTMLFile.objects.filter(project=project).delete()
113+
HTMLFile.objects.filter(project=project).delete()
114+
# Run the query again and this time there should not be any result
109115
result, _ = self._get_search_result(url=self.url, client=client,
110116
search_params={'q': query, 'type': 'file'})
111117
assert len(result) == 0

0 commit comments

Comments
 (0)