Merge pull request #1617 from alphagov/remove-flask-script

remove flask-script
This commit is contained in:
Leo Hemsted
2017-11-15 17:47:30 +00:00
committed by GitHub
12 changed files with 68 additions and 89 deletions

View File

@@ -34,7 +34,7 @@ def test_form_contains_next_24h():
@freeze_time("2016-01-01 11:09:00.061258")
def test_form_defaults_to_now():
def test_form_defaults_to_now(client):
assert ChooseTimeForm().scheduled_for.data == ''

View File

@@ -5,7 +5,7 @@ from unittest.mock import Mock
import pytest
from notifications_python_client.errors import HTTPError
from flask import url_for
from flask import url_for, Flask
from bs4 import BeautifulSoup
from app import create_app
@@ -34,17 +34,16 @@ import json
@pytest.fixture(scope='session')
def app_(request):
app = create_app()
app = Flask('app')
create_app(app)
ctx = app.app_context()
ctx.push()
def teardown():
ctx.pop()
request.addfinalizer(teardown)
app.test_client_class = TestClient
return app
yield app
ctx.pop()
@pytest.fixture(scope='function')