remove dependence and implmented import_string

This commit is contained in:
Jotagê Sales
2018-12-26 21:19:54 -02:00
parent 19b304b0fc
commit a33ebbaf11
5 changed files with 25 additions and 4 deletions

View File

@@ -35,6 +35,11 @@ def test_load_from_object_string(app):
assert 'not_for_config' not in app.config
def test_load_from_object_string_exception(app):
with pytest.raises(ImportError):
app.config.from_object('test_config.Config.test')
def test_auto_load_env():
environ["SANIC_TEST_ANSWER"] = "42"
app = Sanic()