Fixed a bug in the testsuite that caused problems when dots where in directory names

This commit is contained in:
Armin Ronacher 2011-08-26 11:48:33 +01:00
parent d5cd4f8d59
commit fbd6776e68
2 changed files with 3 additions and 3 deletions

View file

@ -29,7 +29,7 @@ class ConfigTestCase(FlaskTestCase):
def test_config_from_file(self):
app = flask.Flask(__name__)
app.config.from_pyfile(__file__.rsplit('.')[0] + '.py')
app.config.from_pyfile(__file__.rsplit('.', 1)[0] + '.py')
self.common_object_test(app)
def test_config_from_object(self):
@ -59,7 +59,7 @@ class ConfigTestCase(FlaskTestCase):
self.assert_(0, 'expected exception')
self.assert_(not app.config.from_envvar('FOO_SETTINGS', silent=True))
os.environ = {'FOO_SETTINGS': __file__.rsplit('.')[0] + '.py'}
os.environ = {'FOO_SETTINGS': __file__.rsplit('.', 1)[0] + '.py'}
self.assert_(app.config.from_envvar('FOO_SETTINGS'))
self.common_object_test(app)
finally: