Exemple #1
0
def test_app_factory_pattern(app):
    sendwithus = Sendwithus()
    sendwithus.init_app(app)
    with pytest.raises(RuntimeError):
        assert sendwithus.api_key == TEST_API_KEY
    with app.test_request_context():
        assert sendwithus.api_key == TEST_API_KEY
Exemple #2
0
def sendwithus(app):
    sendwithus = Sendwithus()
    sendwithus.init_app(app)
    return sendwithus