Lukáš Lalinský
129304cef7
Add a concept of application teardown
...
The main purpose of this is to have a single place where extensions
can register their cleanup functions. If you are creating many app
instances for testing purposes, you need to keep track of all
individual extensions and release the resources from all of them.
Allowing them to register a cleanup function inside init_app would
hide the complexity and app.close() would be the only thing tests
need to care about.
7 years ago
David Lord
465922e5f1
clean up secret key docs
...
consistent key across docs and examples
consistent key across tests, set in conftest
8 years ago
Christian Stade-Schuldt
4ec1fbc9f5
More DRYing up the test suite ( #2325 )
8 years ago
Alexander Pantyukhin
5e12748d0e
Ignore before_render_template return values
10 years ago
Alexander Pantyukhin
eae37b575d
fix test_signals
10 years ago
Alexander Pantyukhin
e57199e0c4
fix test_signals
10 years ago
Alexander Pantyukhin
967907ee81
before_render_template signal can override render template.
10 years ago
Alexander Pantyukhin
1fbeb337c4
fix endline in the signal.py
10 years ago
Alexander Pantyukhin
d53d5c732b
before_render_template signal
10 years ago
Parkayun
33534bb4a9
Happy New Year 2015
10 years ago
Petr Zemek
e41bf1e181
Remove two redundant empty lines.
...
PEP8 suggests to use two empty lines to separate functions, not three.
10 years ago
Davide Ceretti
93c190a8fd
Add unittest for appcontext_tearing_down signal
10 years ago
Markus Unterwaditzer
af4cb0ff2b
Remove flask superclass
11 years ago
Markus Unterwaditzer
af41dbe0c4
Remove useless classes
11 years ago
Markus Unterwaditzer
5da2c00419
Rewrite assertion methods
11 years ago
Markus Unterwaditzer
dd6b2574c9
Rework test_signals
11 years ago
Markus Unterwaditzer
8fa5e32d9a
Tests pass now.
11 years ago
Markus Unterwaditzer
961db8ad72
Made tests recognizable
11 years ago
Markus Unterwaditzer
3550b26071
Move tests
11 years ago
Daniel Neuhäuser
52098e1e4f
Happy New Year 2014
11 years ago
Daniel Neuhäuser
f88cc2d2f9
Fix broken test_appcontext_signals test case
...
This fixes #781 and ensures that Flask is tested with blinker installed.
12 years ago
Armin Ronacher
0676bb8ab5
Added appcontext_pushed and appcontext_popped signals
12 years ago
Thomas Waldmann
ac04bc7836
replace 1/0 by 1 // 0 to get rid of DeprecationWarning (and PEP8 issue)
12 years ago
Daniel Neuhäuser
239780be28
Use assert_true instead of assert_
...
assert_ is deprecated which causes annoying warnings
12 years ago
Markus Unterwaditzer
05f66ad735
Fix some literals
12 years ago
Thomas Waldmann
e1d356fb71
ported some more stuff to py 3.3
...
removed init_jinja_globals hack from app.py after consulting mitsuhiko
(didn't work on py 3.3 "as is")
removed with_statement future imports, not needed any more
needs more work on 2.7 as well as on 3.3
12 years ago
Paulo Poiati
b2aae044ca
Flash messages signals
...
If we send a signal when a template is rendered why not when a message
is flashed? One real world use case is in tests, this signal should make
flash messages expectation easier to implement.
12 years ago
Armin Ronacher
fc2caa4b9c
Changed assert to self.assert_ where it was still in place
14 years ago
Armin Ronacher
3069e2d7f7
Fight the generic asserts!
14 years ago
Armin Ronacher
4cb6eea8f1
Split up testsuite and moved it to flask.testsuite. This fixes #246
14 years ago