Moved the conversion thing into the ConfigAttribute.

This commit is contained in:
Armin Ronacher 2011-09-25 19:17:50 +02:00
parent 6dccf77546
commit 8da8a21b69
3 changed files with 27 additions and 28 deletions

View file

@ -78,6 +78,11 @@ class ConfigTestCase(FlaskTestCase):
self.assert_(0, 'expected config')
self.assert_(not app.config.from_pyfile('missing.cfg', silent=True))
def test_session_lifetime(self):
app = flask.Flask(__name__)
app.config['PERMANENT_SESSION_LIFETIME'] = 42
self.assert_equal(app.permanent_session_lifetime.total_seconds(), 42)
class InstanceTestCase(FlaskTestCase):