Permalink
Browse files

Test passes.

Added test for silent flag; added import of errno so it passed.
  • Loading branch information...
1 parent 5cc40f4 commit fa9817778c83eb35b9c2c4332ccb7e5190d1ffa2 @akavlie akavlie committed Mar 14, 2011
Showing with 3 additions and 1 deletion.
  1. +1 −0 flask/config.py
  2. +2 −1 tests/flask_tests.py
View
@@ -14,6 +14,7 @@
import imp
import os
import sys
+import errno
from werkzeug import import_string
View
@@ -1310,7 +1310,7 @@ def test_config_from_envvar(self):
assert "'FOO_SETTINGS' is not set" in str(e)
else:
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'}
assert app.config.from_envvar('FOO_SETTINGS')
@@ -1329,6 +1329,7 @@ def test_config_missing(self):
assert msg.endswith("missing.cfg'")
else:
assert 0, 'expected config'
+ assert not app.config.from_pyfile('missing.cfg', silent=True)
class SubdomainTestCase(unittest.TestCase):

0 comments on commit fa98177

Please sign in to comment.