pbr-ayct-backend/ayct-backend/tests/test_ayct_backend.py

20 lines
381 B
Python
Raw Normal View History

import os
import tempfile
import pytest
from app import create_app
@pytest.fixture
def client():
app = create_app()
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