contentdb/app/tests/integ/test_homepage.py
2021-05-03 22:22:17 +01:00

22 lines
479 B
Python

from app.default_data import populate_test_data
from app.models import db
from .utils import client # noqa
def test_homepage_empty(client):
"""Start with a blank database."""
rv = client.get("/")
assert b"No packages available" in rv.data and b"packagegridscrub" not in rv.data
def test_homepage_with_contents(client):
"""Start with a test database."""
populate_test_data(db.session)
db.session.commit()
rv = client.get("/")
assert b"packagegridscrub" in rv.data