Files
website-v2/libraries/tests/test_api.py
Greg Newman 38e2a6aba7 test for library api search
* Adds a simple test for the api search view

Issue: #88
2023-02-24 10:38:16 -05:00

10 lines
291 B
Python

def test_library_search(library, tp):
"""
GET /api/v1/libraries/?q=
A library containing the querystring is returned
"""
library = library
res = tp.get(f"/api/v1/libraries/?q={library.name[:3]}")
tp.response_200(res)
assert len(res.context["libraries"]) == 1