Implement 0.6 routing and some cleanup (#2117)

* Implement 0.6 routing and some cleanup

* Additional tests and annotation cleanup

* Resolve sorting

* cleanup test with encoding
This commit is contained in:
Adam Hopkins
2021-04-20 00:53:42 +03:00
committed by GitHub
parent 9b26358e63
commit 28ba8e53df
16 changed files with 189 additions and 61 deletions

View File

@@ -80,7 +80,7 @@ def test_dont_load_env():
del environ["SANIC_TEST_ANSWER"]
@pytest.mark.parametrize('load_env', [None, False, "", "MYAPP_"])
@pytest.mark.parametrize("load_env", [None, False, "", "MYAPP_"])
def test_load_env_deprecation(load_env):
with pytest.warns(DeprecationWarning, match=r"21\.12"):
_ = Sanic(name=__name__, load_env=load_env)
@@ -93,7 +93,7 @@ def test_load_env_prefix():
del environ["MYAPP_TEST_ANSWER"]
@pytest.mark.parametrize('env_prefix', [None, ""])
@pytest.mark.parametrize("env_prefix", [None, ""])
def test_empty_load_env_prefix(env_prefix):
environ["SANIC_TEST_ANSWER"] = "42"
app = Sanic(name=__name__, env_prefix=env_prefix)