mirror of https://github.com/mitsuhiko/flask.git
Markus Unterwaditzer
8 years ago
committed by
GitHub
10 changed files with 37 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||||||
|
from setuptools import setup |
||||||
|
|
||||||
|
setup( |
||||||
|
name='yourapplication', |
||||||
|
packages=['yourapplication'], |
||||||
|
include_package_data=True, |
||||||
|
install_requires=[ |
||||||
|
'flask', |
||||||
|
], |
||||||
|
) |
@ -0,0 +1,12 @@ |
|||||||
|
from yourapplication import app |
||||||
|
import pytest |
||||||
|
|
||||||
|
@pytest.fixture |
||||||
|
def client(): |
||||||
|
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,0 +1,4 @@ |
|||||||
|
from flask import Flask |
||||||
|
app = Flask(__name__) |
||||||
|
|
||||||
|
import yourapplication.views |
@ -0,0 +1,5 @@ |
|||||||
|
from yourapplication import app |
||||||
|
|
||||||
|
@app.route('/') |
||||||
|
def index(): |
||||||
|
return 'Hello World!' |
Loading…
Reference in new issue