
Add unit tests for Promenade API endpoints. Also adds validatedesign API endpoint. Change-Id: I4c6a5da1f521f913c94ae8a07c8bc43cf4114f75
19 lines
475 B
Python
19 lines
475 B
Python
import falcon
|
|
from falcon import testing
|
|
import pytest
|
|
|
|
from promenade.control.api import VersionsResource
|
|
from promenade.promenade import promenade
|
|
|
|
|
|
@pytest.fixture()
|
|
def client():
|
|
return testing.TestClient(promenade)
|
|
|
|
def test_get_versions(client):
|
|
response = client.simulate_get('/versions')
|
|
assert response.status == falcon.HTTP_200
|
|
body = response.content.decode('utf-8')
|
|
assert '"path": "/api/v1.0"' in body
|
|
assert '"status": "stable"' in body
|