2021-11-30 16:13:45 +01:00
|
|
|
import os
|
|
|
|
import tempfile
|
|
|
|
|
|
|
|
import pytest
|
2021-12-01 14:25:42 +01:00
|
|
|
from ayct_backend import create_app
|
2021-11-30 16:13:45 +01:00
|
|
|
|
|
|
|
@pytest.fixture
|
2021-12-01 14:50:03 +01:00
|
|
|
def app():
|
2021-11-30 16:13:45 +01:00
|
|
|
app = create_app()
|
|
|
|
|
2021-12-01 14:50:03 +01:00
|
|
|
yield app
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def client(app):
|
|
|
|
yield app.test_client()
|
2021-11-30 16:13:45 +01:00
|
|
|
|
|
|
|
def test_first_endpoint(client):
|
|
|
|
rv = client.get("/hello")
|
|
|
|
assert b'All You Can Tweet' in rv.data
|