init
This commit is contained in:
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
27
tests/test_app.py
Normal file
27
tests/test_app.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import falcon
|
||||
from falcon import testing
|
||||
import msgpack
|
||||
import pytest
|
||||
|
||||
from app.app import app
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def client():
|
||||
return testing.TestClient(app)
|
||||
|
||||
|
||||
def test_list_images(client):
|
||||
doc = {
|
||||
'images': [
|
||||
{
|
||||
'href': '/images/1eaf6ef1-7f2d-4ecc-a8d5-6e8adba7cc0e.png',
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
response = client.simulate_get('/images')
|
||||
result_doc = msgpack.unpackb(response.content, raw=False)
|
||||
|
||||
assert result_doc == doc
|
||||
assert response.status == falcon.HTTP_OK
|
Reference in New Issue
Block a user