1
0
mirror of https://github.com/quay/quay.git synced 2026-01-27 18:42:52 +03:00
Files
quay/endpoints/api/test/shared.py
Kenny Lee Sin Cheong 5f63b3a7bb chore: drop deprecated tables and remove unused code (PROJQUAY-522) (#2089)
* chore: drop deprecated tables and remove unused code

* isort imports

* migration: check for table existence before drop
2023-08-25 12:17:24 -04:00

15 lines
474 B
Python

from endpoints.api import api
from endpoints.test.shared import conduct_call
def conduct_api_call(client, resource, method, params, body=None, expected_code=200, headers=None):
"""
Conducts an API call to the given resource via the given client, and ensures its returned status
matches the code given.
Returns the response.
"""
return conduct_call(
client, resource, api.url_for, method, params, body, expected_code, headers=headers
)