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 .
2013-06-09 12:06:33 +01:00
Armin Ronacher
93073489a0
Documented changes on the g object some more
2013-06-05 10:02:33 +01:00
Armin Ronacher
fd99abea57
Fixed too strict tests for cookie setting that broke on werkzeug changes
2013-06-05 09:47:31 +01:00
Armin Ronacher
56d3b74488
Added a test for non-ascii routing
2013-06-02 23:24:28 +01:00
Armin Ronacher
1b40b3b573
Fixed request context preservation and teardown handler interaction.
2013-06-02 21:47:32 +01:00
Armin Ronacher
90e3906d02
Fixed some test failures
2013-05-30 17:58:27 +01:00
Armin Ronacher
eb622fb34f
Fixed a whole bunch of resource warnings in the flask testsuite
2013-05-30 14:31:36 +01:00
Armin Ronacher
47572c5b40
Set the content length automatically before calling wrap_file
2013-05-30 14:24:29 +01:00
Thomas Waldmann
ac04bc7836
replace 1/0 by 1 // 0 to get rid of DeprecationWarning (and PEP8 issue)
2013-05-26 20:33:22 +02:00
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.
2013-05-25 20:58:12 +02:00
Daniel Neuhäuser
79ec3d81c1
Prevent UnboundLocalError in test_build_error_handler
2013-05-22 22:58:12 +02:00
Daniel Neuhäuser
a0801719f8
Remove six dependency
2013-05-22 21:40:30 +02:00
Daniel Neuhäuser
62e7275bdf
Use assert_false where appropriate
2013-05-22 20:17:29 +02:00
Daniel Neuhäuser
9f8a2075c7
Use assert_in where appropriate
2013-05-22 20:12:50 +02:00
Daniel Neuhäuser
239780be28
Use assert_true instead of assert_
...
assert_ is deprecated which causes annoying warnings
2013-05-22 17:23:38 +02:00
Daniel Neuhäuser
5b89355b1c
Response data is bytes
2013-05-22 17:14:07 +02:00
Markus Unterwaditzer
05f66ad735
Fix some literals
2013-05-22 17:09:37 +02:00
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
2013-05-22 01:33:04 +02:00
Daniel Neuhäuser
8494574fdf
Merge branch 'six' of github.com:ThomasWaldmann/flask into ThomasWaldmann-six
...
Conflicts:
flask/testsuite/__init__.py
2013-05-18 18:54:45 +02:00
Thomas Waldmann
522cd00093
python-modernize automated changes: fix_unicode (but without six.u())
2013-05-18 18:12:30 +02:00
Thomas Waldmann
6caaa8a527
automated change using python-modernize: use 'as' in except
2013-05-18 16:24:40 +02:00
Armin Ronacher
18673ba370
Added uuid support for new session serialization and documented it
2013-05-14 11:33:36 +01:00
Armin Ronacher
097353695e
Added flask.copy_current_request_context which simplies working with greenlets
2013-05-14 11:00:04 +01:00
Armin Ronacher
bfeee75696
Changed session cookie defaults to work better with google chrome
2013-01-29 19:31:45 +00:00
Armin Ronacher
1949c4a9ab
flask.g is now on the app context and not the request context
2012-12-21 11:45:42 +01:00
Armin Ronacher
661ee54bc2
Raise exceptions if a function is overridden by a new endpoint. This fixes #570
2012-10-07 17:12:16 +02:00
Armin Ronacher
4df3bf2058
Implemented experimental JSON based sessions
2012-08-11 02:36:14 +01:00
Armin Ronacher
a9e753f706
Merge pull request #497 from ekoka/master
...
fix for https://github.com/mitsuhiko/flask/issues/494
2012-06-17 06:24:35 -07:00
Armin Ronacher
086348e2f2
Added after_this_request decorator.
2012-05-08 13:14:32 +01:00
Armin Ronacher
2053d04db0
Improved interface for the URL build error handler
2012-05-08 11:56:11 +01:00
ekoka
12dcba8849
Update flask/testsuite/basic.py
2012-04-24 05:32:52 -03:00
Ron DuPlain
8c8c524ddb
Re-raise BuildError with traceback.
2012-04-22 12:51:31 -04:00
Ron DuPlain
bb31188ec3
Add a BuildError hook to url_for, #456 .
2012-04-22 12:30:15 -04:00
Armin Ronacher
cf1641e5be
Changed the implementation of returning tuples from functions
2012-04-09 15:56:33 +01:00
James Saryerwinnie
075b6b11c8
Fix issue 140
...
This allows for a view function to return something like:
jsonify(error="error msg"), 400
2012-03-11 20:45:58 -07:00
Ron DuPlain
2e5de98297
Use app.testing=True for asserts in messages test.
2012-01-17 19:33:48 -05:00
Ron DuPlain
676b3a4c13
Check status code in test client or fail silently.
2012-01-16 22:44:06 -05:00
Ron DuPlain
b9907b4969
Expand get_flashed_messages tests.
...
Ready to pull request #336 .
http://github.com/mitsuhiko/flask/pull/336
2012-01-16 22:22:08 -05:00
Armin Ronacher
d628df6ab6
Store session after callbacks. This fixes #351
2011-11-20 16:54:40 +01:00
Armin Ronacher
c6316132b1
Context preserving is now part of Flask and not the test client. This fixes #326
2011-09-24 20:27:38 +02:00
Armin Ronacher
7331ae3df5
Update the testsuite to not freak out about a change in Werkzeug 0.8 that changed the behavior of misconfigured hosts.
2011-09-03 17:13:01 +02:00
Ron DuPlain
37f9cb9ca6
Import with statement in testsuite, Python 2.5.
2011-09-01 12:35:04 -04:00
Pedro Algarvio
a9e09ec50e
Merge remote-tracking branch 'mitsuhiko/master'
2011-08-31 10:32:59 +01:00
Armin Ronacher
ccf464189b
Added finer control over the session cookie parameters
2011-08-30 14:36:50 +02:00
Armin Ronacher
367b254c78
Make sure that there is a test for subdomain matching with ports
2011-08-26 14:51:28 +01:00
Armin Ronacher
fc2caa4b9c
Changed assert to self.assert_ where it was still in place
2011-08-26 11:43:27 +01:00
Armin Ronacher
3069e2d7f7
Fight the generic asserts!
2011-08-26 11:38:43 +01:00
Armin Ronacher
4cb6eea8f1
Split up testsuite and moved it to flask.testsuite. This fixes #246
2011-08-26 11:21:26 +01:00