Skip to content
Myr

Added TESTING flag. This fixes #58.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 06ed3e1 · Browse files · 3 files+12 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+12 added−0 removed

  • other:+12 added−0 removed

3 files+12 added−0 removed

modified:docs/config.rst+1 added
51 unmodified lines
52.. tabularcolumns:: |p{6.5cm}|p{8.5cm}|5354=============================== =========================================55``DEBUG`` enable/disable debug mode56``TESTING`` enable/disable testing mode57``SECRET_KEY`` the secret key58``SESSION_COOKIE_NAME`` the name of the session cookie59``PERMANENT_SESSION_LIFETIME`` the lifetime of a permanent session as60 :class:`datetime.timedelta` object.
65 unmodified lines
modified:CHANGES+1 added
16 unmodified lines
17 for a little longer. This can also be used to trigger custom18 requests that do not pop the request stack for testing.19- because the Python standard library caches loggers, the name of20 the logger is configurable now to better support unittests.21- added `TESTING` switch that can activate unittesting helpers.2223Version 0.3.124-------------25
48 unmodified lines
modified:flask.py+10 added
808 unmodified lines
809 #: This attribute can also be configured from the config with the `DEBUG`810 #: configuration key. Defaults to `False`.811 debug = ConfigAttribute('DEBUG')812813 #: The testing flask. Set this to `True` to enable the test mode of814 #: Flask extensions (and in the future probably also Flask itself).815 #: For example this might activate unittest helpers that have an816 #: additional runtime cost which should not be enabled by default.817 #:818 #: This attribute can also be configured from the config with the819 #: `TESTING` configuration key. Defaults to `False`.820 testing = ConfigAttribute('TESTING')821822 #: If a secret key is set, cryptographic components can use this to823 #: sign cookies and other things. Set this to a complex random value824 #: when you want to use the secure cookie for instance.825 #:
52 unmodified lines
878879 #: Default configuration parameters.880 default_config = ImmutableDict({881 'DEBUG': False,882 'TESTING': False,883 'SECRET_KEY': None,884 'SESSION_COOKIE_NAME': 'session',885 'PERMANENT_SESSION_LIFETIME': timedelta(days=31),886 'USE_X_SENDFILE': False,
624 unmodified lines