Browse Source

Test passes.

Added test for silent flag; added import of errno so it passed.
pull/202/head
Aaron Kavlie 14 years ago
parent
commit
fa9817778c
  1. 1
      flask/config.py
  2. 3
      tests/flask_tests.py

1
flask/config.py

@ -14,6 +14,7 @@ from __future__ import with_statement
import imp
import os
import sys
import errno
from werkzeug import import_string

3
tests/flask_tests.py

@ -1310,7 +1310,7 @@ class ConfigTestCase(unittest.TestCase):
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 @@ class ConfigTestCase(unittest.TestCase):
assert msg.endswith("missing.cfg'")
else:
assert 0, 'expected config'
assert not app.config.from_pyfile('missing.cfg', silent=True)
class SubdomainTestCase(unittest.TestCase):

Loading…
Cancel
Save