Markus Unterwaditzer
bd232e5c82
PEP8
10 years ago
Gilman Callsen
d425279650
Improve compression by removing whitespace from separators when using jsonify() and JSONIFY_PRETTYPRINT_REGULAR is False.
...
Commit includes Changelog entry and two new tests in test_basic.py.
10 years ago
Paulo Bu
3f67fe94f1
Adds 2 tests for Flask.run method
10 years ago
Markus Unterwaditzer
a4931ff3a7
Kill class in test_basic
10 years ago
Markus Unterwaditzer
af4cb0ff2b
Remove flask superclass
10 years ago
Markus Unterwaditzer
af41dbe0c4
Remove useless classes
10 years ago
Markus Unterwaditzer
5da2c00419
Rewrite assertion methods
10 years ago
Markus Unterwaditzer
8fa5e32d9a
Tests pass now.
10 years ago
Markus Unterwaditzer
961db8ad72
Made tests recognizable
10 years ago
Markus Unterwaditzer
3550b26071
Move tests
10 years ago
Armin Ronacher
817b72d484
Removed deprecated module functionality
10 years ago
Armin Ronacher
84ad89ffa4
Always log now, even if debug is off.
10 years ago
Armin Ronacher
ddb5f9dc49
Fixed a broken test
11 years ago
Armin Ronacher
75f2af7a6a
Use a condition variable instead of sleeping
11 years ago
Alexis Svinartchouk
280d865960
fix issue #879 and add a test for it
...
Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
11 years ago
Daniel Neuhäuser
52098e1e4f
Happy New Year 2014
11 years ago
Mikael Åhlén
dbc4096191
added a new test case with a Response instance and cleaned up the code
11 years ago
Mikael Åhlén
70f8b39c52
added a new behaviour for responses that enable the tuple to be in the form of (response, headers) and continiue to support the (response, status, headers) format.
11 years ago
Daniel Richman
3d67736e09
Check error handlers for specific classes first
...
This allows adding error handlers like this:
@app.errorhandler(werkzeug.exceptions.Forbidden)
And subclassing HTTPExceptions:
class ForbiddenBecauseReason(Forbidden): pass
@app.errorhandler(ForbiddenBecauseReason)
def error1(): return "Forbidden because reason", 403
@app.errorhandler(403)
def error2(): return "Forbidden", 403
... the idea being, that a flask extension might want to raise an
exception, with the default behaviour of creating a HTTP error page,
but still allowing the user to add a view/handler specific to that
exception (e.g., "Forbidden because you are not in the right group").
11 years ago
Markus Unterwaditzer
af5a0853bf
Fix #815
11 years ago
Armin Ronacher
3e4dbf93d9
Fixed a test that broke on 3.x
11 years ago
Armin Ronacher
d1d835c023
Added SESSION_REFRESH_EACH_REQUEST config option.
...
This also changes how sessions are being refreshed. With the new
behavior set-cookie is only emitted if the session is modified or if the
session is permanent. Permanent sessions can be set to not refresh
automatically through the SESSION_REFRESH_EACH_REQUEST config key.
This fixes #798 .
11 years ago
Serge S. Koval
44e39ab071
Fixed class-based views support
12 years ago
Armin Ronacher
58ad83f37c
Added support for bytes in sessions back
12 years ago
Armin Ronacher
c889fbc231
Changed interface for `flask.g`
...
This now makes it behave like it did before, it's just an object.
It did however gain ``__contains__`` and ``__iter__`` and I added
a ``get()`` method to fetch an attribute without raising an
error. This fixes #759 .
12 years ago
Armin Ronacher
93073489a0
Documented changes on the g object some more
12 years ago
Armin Ronacher
fd99abea57
Fixed too strict tests for cookie setting that broke on werkzeug changes
12 years ago
Armin Ronacher
56d3b74488
Added a test for non-ascii routing
12 years ago
Armin Ronacher
1b40b3b573
Fixed request context preservation and teardown handler interaction.
12 years ago
Armin Ronacher
90e3906d02
Fixed some test failures
12 years ago
Armin Ronacher
eb622fb34f
Fixed a whole bunch of resource warnings in the flask testsuite
12 years ago
Armin Ronacher
47572c5b40
Set the content length automatically before calling wrap_file
12 years ago
Thomas Waldmann
ac04bc7836
replace 1/0 by 1 // 0 to get rid of DeprecationWarning (and PEP8 issue)
12 years ago
Thomas Waldmann
f9e9e77464
fix data types in after_request test
...
TODO: why was that bug not causing / displaying an exception somehow?
should give a TypeError in py 3.3.
12 years ago
Daniel Neuhäuser
79ec3d81c1
Prevent UnboundLocalError in test_build_error_handler
12 years ago
Daniel Neuhäuser
a0801719f8
Remove six dependency
12 years ago
Daniel Neuhäuser
62e7275bdf
Use assert_false where appropriate
12 years ago
Daniel Neuhäuser
9f8a2075c7
Use assert_in where appropriate
12 years ago
Daniel Neuhäuser
239780be28
Use assert_true instead of assert_
...
assert_ is deprecated which causes annoying warnings
12 years ago
Daniel Neuhäuser
5b89355b1c
Response data is bytes
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
Thomas Waldmann
522cd00093
python-modernize automated changes: fix_unicode (but without six.u())
12 years ago
Thomas Waldmann
6caaa8a527
automated change using python-modernize: use 'as' in except
12 years ago
Armin Ronacher
18673ba370
Added uuid support for new session serialization and documented it
12 years ago
Armin Ronacher
097353695e
Added flask.copy_current_request_context which simplies working with greenlets
12 years ago
Armin Ronacher
bfeee75696
Changed session cookie defaults to work better with google chrome
12 years ago
Armin Ronacher
1949c4a9ab
flask.g is now on the app context and not the request context
12 years ago
Armin Ronacher
661ee54bc2
Raise exceptions if a function is overridden by a new endpoint. This fixes #570
12 years ago
Armin Ronacher
4df3bf2058
Implemented experimental JSON based sessions
12 years ago