This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/endpoints/api/test/test_search.py
Joseph Schorr e9ffe0e27b Implement new search UI
We now have both autocomplete-based searching for quick results, as well as a full search page for a full listing of results
2017-04-28 13:57:28 -04:00

12 lines
538 B
Python

from endpoints.api.search import ConductRepositorySearch
from endpoints.api.test.shared import client_with_identity, conduct_api_call
from test.fixtures import *
def test_repository_search(client):
with client_with_identity('devtable', client) as cl:
params = {'query': 'simple'}
result = conduct_api_call(cl, ConductRepositorySearch, 'GET', params, None, 200).json
assert not result['has_additional']
assert result['start_index'] == 0
assert result['page'] == 1
assert result['results'][0]['name'] == 'simple'