mirror of
https://github.com/Blockstream/satellite-api.git
synced 2025-03-12 10:30:09 +01:00
- Preserve the SQLite database and use SQLAlchemy to wrap db interactions. - Use Alembic for database migrations. - Organize all the python modules on the new server/ directory. - Use pytest for unit tests and organize test modules at server/tests/.
19 lines
444 B
Python
19 lines
444 B
Python
import pytest
|
|
from http import HTTPStatus
|
|
|
|
import server
|
|
|
|
|
|
@pytest.fixture
|
|
def client():
|
|
app = server.create_app(from_test=True)
|
|
app.app_context().push()
|
|
with app.test_client() as client:
|
|
yield client
|
|
server.teardown_app(app)
|
|
|
|
|
|
def test_get_info_successfuly(client):
|
|
get_queues_rv = client.get('/queue.html')
|
|
assert get_queues_rv.status_code == HTTPStatus.OK
|
|
assert get_queues_rv.content_type == 'text/html'
|