Skip to content

Commit 10b7f36

Browse files
committed
fixup according to comments
1 parent a464ddc commit 10b7f36

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
@@ -107,8 +107,14 @@ def test_file_search_case_insensitive(self, client, project, case):
107107
def test_page_search_not_return_removed_page(self, client, project):
108108
"""Check removed page are not in the search index"""
109109
query = get_search_query_from_project_file(project_slug=project.slug)
110+
# Make a query to check it returns result
111+
result, _ = self._get_search_result(url=self.url, client=client,
112+
search_params={'q': query, 'type': 'file'})
113+
assert len(result) == 1
114+
110115
# Delete all the HTML files of the project
111-
p = HTMLFile.objects.filter(project=project).delete()
116+
HTMLFile.objects.filter(project=project).delete()
117+
# Run the query again and this time there should not be any result
112118
result, _ = self._get_search_result(url=self.url, client=client,
113119
search_params={'q': query, 'type': 'file'})
114120
assert len(result) == 0

0 commit comments

Comments
 (0)