def test_get_application_with_api_key_in_env(): with mock.patch.dict('os.environ', {'API_KEY': 'foo'}): app = get_application() assert app.config['API_KEY'] == 'foo'
def test_get_application(debug): app = get_application(debug=debug) assert app.config['API_KEY']
def app(): app = get_application(debug=True).test_client() return app