Skip to content
Myr

Moves largerapp into patterns dir and add test

Before adoption: this commit came in with the history the project adopted, so no landing records it.

- also adds this pattern into tox for testing

authored by wgwz · committed by wgwz · parent 949771a · Browse files · 16 files+32 added−19 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

16 files+32 added−19 removed

  • tests:+12 added−0 removed
  • other:+20 added−19 removed

16 files+32 added−19 removed

deleted:examples/largerapp/yourapplication/static/style.css
deleted:examples/largerapp/yourapplication/templates/index.html
deleted:examples/largerapp/yourapplication/templates/layout.html
deleted:examples/largerapp/yourapplication/templates/login.html
deleted:examples/largerapp/yourapplication/__init__.py-4 removed
1from flask import Flask2app = Flask(__name__)34import yourapplication.views
deleted:examples/largerapp/yourapplication/views.py-5 removed
1from yourapplication import app23@app.route('/')4def index():5 return 'Hello World!'
deleted:examples/largerapp/setup.py-10 removed
1from setuptools import setup23setup(4 name='yourapplication',5 packages=['yourapplication'],6 include_package_data=True,7 install_requires=[8 'flask',9 ],10)
added:examples/patterns/largerapp/tests/test_largerapp.py+12 added
1from yourapplication import app2import pytest34@pytest.fixture5def client(request):6 app.config['TESTING'] = True7 client = app.test_client()8 return client910def test_index(client):11 rv = client.get('/')12 assert b"Hello World!" in rv.data
added:examples/patterns/largerapp/yourapplication/static/style.css
added:examples/patterns/largerapp/yourapplication/templates/index.html
added:examples/patterns/largerapp/yourapplication/templates/layout.html
added:examples/patterns/largerapp/yourapplication/templates/login.html
added:examples/patterns/largerapp/yourapplication/__init__.py+4 added
1from flask import Flask2app = Flask(__name__)34import yourapplication.views
added:examples/patterns/largerapp/yourapplication/views.py+5 added
1from yourapplication import app23@app.route('/')4def index():5 return 'Hello World!'
added:examples/patterns/largerapp/setup.py+10 added
1from setuptools import setup23setup(4 name='yourapplication',5 packages=['yourapplication'],6 include_package_data=True,7 install_requires=[8 'flask',9 ],10)
modified:tox.ini+1 added
8 unmodified lines
9commands =10 # We need to install those after Flask is installed.11 pip install -e examples/flaskr12 pip install -e examples/minitwit13 pip install -e examples/patterns/largerapp14 py.test --cov=flask --cov-report html []15deps=16 pytest17 pytest-cov
16 unmodified lines