forked from orbit-oss/flask
Merge branch 'master' of https://github.com/Xion/flask into Xion-master
Conflicts: flask/testsuite/config.py
This commit is contained in:
commit
66e51d5be7
3 changed files with 23 additions and 1 deletions
|
|
@ -119,6 +119,16 @@ class ConfigTestCase(FlaskTestCase):
|
|||
self.assert_true(0, 'expected config')
|
||||
self.assert_false(app.config.from_json('missing.json', silent=True))
|
||||
|
||||
def test_custom_config_class(self):
|
||||
class Config(flask.Config):
|
||||
pass
|
||||
class Flask(flask.Flask):
|
||||
config_class = Config
|
||||
app = Flask(__name__)
|
||||
self.assert_isinstance(app.config, Config)
|
||||
app.config.from_object(__name__)
|
||||
self.common_object_test(app)
|
||||
|
||||
def test_session_lifetime(self):
|
||||
app = flask.Flask(__name__)
|
||||
app.config['PERMANENT_SESSION_LIFETIME'] = 42
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue