forked from orbit-oss/flask
Test passes.
Added test for silent flag; added import of errno so it passed.
This commit is contained in:
parent
5cc40f4728
commit
fa9817778c
2 changed files with 3 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ from __future__ import with_statement
|
||||||
import imp
|
import imp
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import errno
|
||||||
|
|
||||||
from werkzeug import import_string
|
from werkzeug import import_string
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1310,7 +1310,7 @@ class ConfigTestCase(unittest.TestCase):
|
||||||
assert "'FOO_SETTINGS' is not set" in str(e)
|
assert "'FOO_SETTINGS' is not set" in str(e)
|
||||||
else:
|
else:
|
||||||
assert 0, 'expected exception'
|
assert 0, 'expected exception'
|
||||||
not app.config.from_envvar('FOO_SETTINGS', silent=True)
|
assert not app.config.from_envvar('FOO_SETTINGS', silent=True)
|
||||||
|
|
||||||
os.environ = {'FOO_SETTINGS': 'flask_tests.py'}
|
os.environ = {'FOO_SETTINGS': 'flask_tests.py'}
|
||||||
assert app.config.from_envvar('FOO_SETTINGS')
|
assert app.config.from_envvar('FOO_SETTINGS')
|
||||||
|
|
@ -1329,6 +1329,7 @@ class ConfigTestCase(unittest.TestCase):
|
||||||
assert msg.endswith("missing.cfg'")
|
assert msg.endswith("missing.cfg'")
|
||||||
else:
|
else:
|
||||||
assert 0, 'expected config'
|
assert 0, 'expected config'
|
||||||
|
assert not app.config.from_pyfile('missing.cfg', silent=True)
|
||||||
|
|
||||||
|
|
||||||
class SubdomainTestCase(unittest.TestCase):
|
class SubdomainTestCase(unittest.TestCase):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue