Skip to content

Commit

Permalink
Merge pull request #17547 from nsoranzo/fix_test_index_advanced_filter
Browse files Browse the repository at this point in the history
Fix ``test_index_advanced_filter`` API test re-running
  • Loading branch information
davelopez authored Feb 27, 2024
2 parents 4cc9a7a + 24063e5 commit 5de7b6f
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions lib/galaxy_test/api/test_histories.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,31 +189,26 @@ def test_index_advanced_filter(self):
self._delete(f"histories/{history_1}")

name_contains = "history"
query = f"?search={name_contains}"
index_response = self._get(f"histories{query}").json()
data = dict(search=name_contains, show_published=False)
index_response = self._get("histories", data=data).json()
assert len(index_response) == 3

name_contains = "history that match query"
query = f"?search={name_contains}"
index_response = self._get(f"histories{query}").json()
data = dict(search=name_contains, show_published=False)
index_response = self._get("histories", data=data).json()
assert len(index_response) == 3

name_contains = "ANOTHER"
query = f"?search={name_contains}"
index_response = self._get(f"histories{query}").json()
data = dict(search=name_contains, show_published=False)
index_response = self._get("histories", data=data).json()
assert len(index_response) == 0

name_contains = "test"
query = f"?search={name_contains}"
index_response = self._get(f"histories{query}").json()
assert len(index_response) == 3

data = dict(search="is:deleted", show_published=False)
index_response = self._get("histories", data=data).json()
assert len(index_response) == 1

self._update(history_0, {"published": True})
data = dict(search="is:published")
data = dict(search=f"query_{unique_id} is:published")
index_response = self._get("histories", data=data).json()
assert len(index_response) == 1

Expand Down

0 comments on commit 5de7b6f

Please sign in to comment.