blockstream-satellite-api/server/tests/test_queues.py
Blockstream Satellite 9d421771e7 Port the satellite API to python
- 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/.
2021-07-20 12:28:08 -03:00

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'