def test_view(app): """Test view.""" Babel(app) projectwithsharedtask(app) with app.test_client() as client: res = client.get("/") assert res.status_code == 200 assert 'Welcome to projectwithsharedtask' in str(res.data)
def test_init(): """Test extension initialization.""" app = Flask('testapp') ext = projectwithsharedtask(app) assert 'projectwithsharedtask' in app.extensions app = Flask('testapp') ext = projectwithsharedtask() assert 'projectwithsharedtask' not in app.extensions ext.init_app(app) assert 'projectwithsharedtask' in app.extensionssrc