forked from orbit-oss/flask
fix string concats left over by black
This commit is contained in:
parent
3db4697959
commit
53c893b646
10 changed files with 17 additions and 18 deletions
|
|
@ -1726,7 +1726,7 @@ def test_routing_redirect_debugging(app, client):
|
|||
with pytest.raises(AssertionError) as e:
|
||||
client.post("/foo", data={})
|
||||
assert "http://localhost/foo/" in str(e)
|
||||
assert ("Make sure to directly send " "your POST-request to this URL") in str(e)
|
||||
assert ("Make sure to directly send your POST-request to this URL") in str(e)
|
||||
|
||||
rv = client.get("/foo", data={}, follow_redirects=True)
|
||||
assert rv.data == b"success"
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ def test_config_from_envvar_missing(monkeypatch):
|
|||
app.config.from_envvar("FOO_SETTINGS")
|
||||
msg = str(e.value)
|
||||
assert msg.startswith(
|
||||
"[Errno 2] Unable to load configuration " "file (No such file or directory):"
|
||||
"[Errno 2] Unable to load configuration file (No such file or directory):"
|
||||
)
|
||||
assert msg.endswith("missing.cfg'")
|
||||
assert not app.config.from_envvar("FOO_SETTINGS", silent=True)
|
||||
|
|
@ -110,7 +110,7 @@ def test_config_missing():
|
|||
app.config.from_pyfile("missing.cfg")
|
||||
msg = str(e.value)
|
||||
assert msg.startswith(
|
||||
"[Errno 2] Unable to load configuration " "file (No such file or directory):"
|
||||
"[Errno 2] Unable to load configuration file (No such file or directory):"
|
||||
)
|
||||
assert msg.endswith("missing.cfg'")
|
||||
assert not app.config.from_pyfile("missing.cfg", silent=True)
|
||||
|
|
@ -122,7 +122,7 @@ def test_config_missing_json():
|
|||
app.config.from_json("missing.json")
|
||||
msg = str(e.value)
|
||||
assert msg.startswith(
|
||||
"[Errno 2] Unable to load configuration " "file (No such file or directory):"
|
||||
"[Errno 2] Unable to load configuration file (No such file or directory):"
|
||||
)
|
||||
assert msg.endswith("missing.json'")
|
||||
assert not app.config.from_json("missing.json", silent=True)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ def test_installed_module_paths(
|
|||
modules_tmpdir, modules_tmpdir_prefix, purge_module, site_packages, limit_loader
|
||||
):
|
||||
site_packages.join("site_app.py").write(
|
||||
"import flask\n" "app = flask.Flask(__name__)\n"
|
||||
"import flask\napp = flask.Flask(__name__)\n"
|
||||
)
|
||||
purge_module("site_app")
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ def test_request_less_rendering(app, app_ctx):
|
|||
def context_processor():
|
||||
return dict(foo=42)
|
||||
|
||||
rv = flask.render_template_string("Hello {{ config.WORLD_NAME }} " "{{ foo }}")
|
||||
rv = flask.render_template_string("Hello {{ config.WORLD_NAME }} {{ foo }}")
|
||||
assert rv == "Hello Special World 42"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue