23 lines
457 B
Python
23 lines
457 B
Python
# pylint: disable=no-name-in-module, redefined-outer-name
|
|
""" Unit tests """
|
|
|
|
import pytest
|
|
|
|
from beer import beer
|
|
|
|
|
|
@pytest.fixture
|
|
def client():
|
|
""" create flask app """
|
|
|
|
beer.app.config['TESTING'] = True
|
|
with beer.app.test_client() as client:
|
|
yield client
|
|
|
|
|
|
def test_slash(client):
|
|
"""Test wiwth no param"""
|
|
|
|
response = client.get('/')
|
|
assert response.status_code == 200
|
|
assert b'<title>beer</title>' in response.data
|