diff --git a/examples/largerapp/setup.py b/examples/patterns/largerapp/setup.py similarity index 100% rename from examples/largerapp/setup.py rename to examples/patterns/largerapp/setup.py diff --git a/examples/patterns/largerapp/tests/test_largerapp.py b/examples/patterns/largerapp/tests/test_largerapp.py new file mode 100644 index 00000000..acd33c5c --- /dev/null +++ b/examples/patterns/largerapp/tests/test_largerapp.py @@ -0,0 +1,12 @@ +from yourapplication import app +import pytest + +@pytest.fixture +def client(request): + app.config['TESTING'] = True + client = app.test_client() + return client + +def test_index(client): + rv = client.get('/') + assert b"Hello World!" in rv.data \ No newline at end of file diff --git a/examples/largerapp/yourapplication/__init__.py b/examples/patterns/largerapp/yourapplication/__init__.py similarity index 100% rename from examples/largerapp/yourapplication/__init__.py rename to examples/patterns/largerapp/yourapplication/__init__.py diff --git a/examples/largerapp/yourapplication/static/style.css b/examples/patterns/largerapp/yourapplication/static/style.css similarity index 100% rename from examples/largerapp/yourapplication/static/style.css rename to examples/patterns/largerapp/yourapplication/static/style.css diff --git a/examples/largerapp/yourapplication/templates/index.html b/examples/patterns/largerapp/yourapplication/templates/index.html similarity index 100% rename from examples/largerapp/yourapplication/templates/index.html rename to examples/patterns/largerapp/yourapplication/templates/index.html diff --git a/examples/largerapp/yourapplication/templates/layout.html b/examples/patterns/largerapp/yourapplication/templates/layout.html similarity index 100% rename from examples/largerapp/yourapplication/templates/layout.html rename to examples/patterns/largerapp/yourapplication/templates/layout.html diff --git a/examples/largerapp/yourapplication/templates/login.html b/examples/patterns/largerapp/yourapplication/templates/login.html similarity index 100% rename from examples/largerapp/yourapplication/templates/login.html rename to examples/patterns/largerapp/yourapplication/templates/login.html diff --git a/examples/largerapp/yourapplication/views.py b/examples/patterns/largerapp/yourapplication/views.py similarity index 100% rename from examples/largerapp/yourapplication/views.py rename to examples/patterns/largerapp/yourapplication/views.py diff --git a/tox.ini b/tox.ini index 406de5dd..c070a629 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,7 @@ commands = # We need to install those after Flask is installed. pip install -e examples/flaskr pip install -e examples/minitwit + pip install -e examples/patterns/largerapp py.test --cov=flask --cov-report html [] deps= pytest