Skip to content
Snippets Groups Projects
test_index.py 453 B
Newer Older
rxd's avatar
rxd committed
"""
Check index page at / URL.

MemeGenerator

Ruizhe Deng rxd@umich.edu
"""
import bs4


def test_images(client):
rxd's avatar
rxd committed
    """Test the layout and link in the index page."""
rxd's avatar
rxd committed
    # Load and parse index page
    response = client.get("/")
    assert response.status_code == 200
    soup = bs4.BeautifulSoup(response.data, "html.parser")
    types = [x.get("type") for x in soup.find_all('input')]
    
    assert 'text' in types
    assert 'submit' in types