pbr-ayct-backend/tests/test_ayct_backend.py
wangobango 1f6260c976 test
2021-12-01 14:25:42 +01:00

20 lines
422 B
Python

import os
import tempfile
import pytest
from ayct_backend import create_app
@pytest.fixture
def client():
app = create_app()
app.config['TESTING'] = True
app.run(host = '0.0.0.0', port = 5000)
with app.test_client() as client:
with app.app_context():
pass
yield client
def test_first_endpoint(client):
rv = client.get("/hello")
assert b'All You Can Tweet' in rv.data