Browse Source

Moves largerapp into patterns dir and add test

- also adds this pattern into tox for testing
pull/2131/head
wgwz 8 years ago
parent
commit
92fa444259
  1. 0
      examples/patterns/largerapp/setup.py
  2. 12
      examples/patterns/largerapp/tests/test_largerapp.py
  3. 0
      examples/patterns/largerapp/yourapplication/__init__.py
  4. 0
      examples/patterns/largerapp/yourapplication/static/style.css
  5. 0
      examples/patterns/largerapp/yourapplication/templates/index.html
  6. 0
      examples/patterns/largerapp/yourapplication/templates/layout.html
  7. 0
      examples/patterns/largerapp/yourapplication/templates/login.html
  8. 0
      examples/patterns/largerapp/yourapplication/views.py
  9. 1
      tox.ini

0
examples/largerapp/setup.py → examples/patterns/largerapp/setup.py

12
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

0
examples/largerapp/yourapplication/__init__.py → examples/patterns/largerapp/yourapplication/__init__.py

0
examples/largerapp/yourapplication/static/style.css → examples/patterns/largerapp/yourapplication/static/style.css

0
examples/largerapp/yourapplication/templates/index.html → examples/patterns/largerapp/yourapplication/templates/index.html

0
examples/largerapp/yourapplication/templates/layout.html → examples/patterns/largerapp/yourapplication/templates/layout.html

0
examples/largerapp/yourapplication/templates/login.html → examples/patterns/largerapp/yourapplication/templates/login.html

0
examples/largerapp/yourapplication/views.py → examples/patterns/largerapp/yourapplication/views.py

1
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

Loading…
Cancel
Save