Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common format #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sample_app/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .app import create_app
from .app import app
14 changes: 7 additions & 7 deletions sample_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
from flask_pwa import PWA


def create_app():
app = Flask(__name__)
PWA(app)
app = Flask(__name__)
PWA(app)

@app.route("/")
def index():
return render_template("index.html")
@app.route("/")
def index():
return render_template("index.html")

return app
if __name__ == '__main__':
app.run()
3 changes: 1 addition & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import pytest

from sample_app import create_app
from sample_app import app


@pytest.fixture()
def client():
app = create_app()
context = app.app_context()
context.push()

Expand Down