1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-06-28 17:13:46 +02:00
dspace-statistics-api/tests/test_api_docs.py
Alan Orth 7de1084f60
All checks were successful
continuous-integration/drone/push Build is passing
Add whitespace before vim modeline
black wants this...
2020-12-24 13:12:06 +02:00

49 lines
1.0 KiB
Python

from falcon import testing
import pytest
from dspace_statistics_api.app import api
@pytest.fixture
def client():
return testing.TestClient(api)
def test_get_docs(client):
"""Test requesting the documentation at the root."""
response = client.simulate_get("/")
assert isinstance(response.content, bytes)
assert response.status_code == 200
def test_get_openapi_json(client):
"""Test requesting the OpenAPI JSON schema."""
response = client.simulate_get("/docs/openapi.json")
assert isinstance(response.content, bytes)
assert response.status_code == 200
def test_get_swagger_ui(client):
"""Test requesting the Swagger UI."""
response = client.simulate_get("/swagger")
assert isinstance(response.content, bytes)
assert response.status_code == 200
def test_get_status(client):
"""Test requesting the status page."""
response = client.simulate_get("/status")
assert isinstance(response.content, bytes)
assert response.status_code == 200
# vim: set sw=4 ts=4 expandtab: