Commit graph

135 commits

Author SHA1 Message Date
Armin Ronacher
7f35fc2935 Merge pull request #751 from ThomasWaldmann/sprint-branch
fixing issues found while debugging, fix error in 1 test
2013-05-30 07:08:17 -07:00
Thomas Waldmann
51042f4c9f fix issues in test_context_refcounts that were unnoticed yet as they did not make the test fail 2013-05-30 16:00:43 +02:00
Armin Ronacher
8aaf302586 Disable direct passthrough for accessing the data attribute on newer Werkzeugs 2013-05-30 14:35:23 +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
Armin Ronacher
775c76ac5c Enabled test mode for an app 2013-05-30 12:48:04 +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
13cc69911c fix typos 2013-05-25 22:01:14 +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
Thomas Waldmann
af5576a6c5 fix iterator in testsuite helpers 2013-05-25 19:46:26 +02:00
Armin Ronacher
85ba8c96e9 Fixed a broken test 2013-05-23 14:07:25 +01:00
Armin Ronacher
16df96c552 Merge branch 'master' into sprint-branch 2013-05-23 14:01:33 +01:00
Armin Ronacher
4c27f7a8c4 Removed incorrect JSON exception subclasses 2013-05-23 13:59:10 +01: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
d395d3684a Merge pull request #739 from untitaker/sprint-branch
Fix leak in leak detection code
2013-05-22 12:16:25 -07:00
Markus Unterwaditzer
3d36d6efb9 Fix leak in leak detection code
If ensure_clean_request_context found a leak, it would raise an
AssertionError and not clean up the leak, and therefore affect other
testcases.
2013-05-22 21:09:32 +02:00
Daniel Neuhäuser
3f80b0fd6c module name is quoted in ImportErrors on 3.x 2013-05-22 21:03:01 +02:00
Daniel Neuhäuser
8f73c552a9 Add missing assertIn, assertNotIn methods on 2.6 2013-05-22 20:53:32 +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
4d73ef1a19 Add missing msg argument to assert_true() 2013-05-22 19:19:46 +02:00
Daniel Neuhäuser
8e9f0bdedc Use assert_equal instead of assertEquals
assertEquals is deprecated and its use inconsistent
2013-05-22 17:30:37 +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
c618db92d6 reload_module is in six.moves 2013-05-18 18:55:36 +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
287905e67c py3 compat: use six.reload_module 2013-05-18 18:39:10 +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
dcd052366b python-modernize automated changes: fix_next 2013-05-18 18:03:37 +02:00
Thomas Waldmann
cfbfff2d26 python-modernize automated changes: misc. minor stuff 2013-05-18 17:57:43 +02:00
Thomas Waldmann
6caaa8a527 automated change using python-modernize: use 'as' in except 2013-05-18 16:24:40 +02:00
Armin Ronacher
574a97cd70 Disabled memory tests by default 2013-05-14 11:51:38 +01: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
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.
2013-02-28 01:19:52 -03:00
Armin Ronacher
bfeee75696 Changed session cookie defaults to work better with google chrome 2013-01-29 19:31:45 +00:00
Armin Ronacher
3b393f89f6 Added template_global, fixes #657 2013-01-27 00:46:19 +00:00
Max Countryman
b5069d07a2 adding _scheme parameter to url_for
In order to better facilitate generation of URLs that make use of an HTTPS URL
scheme this patch adds a parameter with this specific purpose in mind. To
achieve this we explicitly pass in a param, `_scheme='https'`, and then set the
`url_scheme` attribute of our `MapAdapter` instance appropriately.

Importantly, `_external=True` must be set in order for this to work properly.
As such, failure to do so results in a `ValueError` being raised.
2013-01-21 16:18:46 -08:00
Armin Ronacher
61d3bbf1d2 Fixed last commit and added test 2013-01-21 17:55:07 +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
8339cb3508 Added support for unicode json dumping. This fixes #535 2012-10-18 00:48:15 +01:00
Mitchell Peabody
a15c6c569a The builder on github is using python 2.5, the views.py testsuite uses the with
statement, and thus flask/testsuite/views.py requires

from __future__ import with_statement

at the beginning.
2012-10-16 16:57:57 -04:00
Armin Ronacher
f34c028125 Added template tests and made config a true global 2012-10-08 07:01:49 +02:00
Armin Ronacher
05c6502cbd Let json.* work even without app on the stack and added tests 2012-10-07 23:41:41 +02:00
Armin Ronacher
3afcbf160e Extra safety for safe_join. Does not look exploitable but better safe than sorry. Fixes #501 2012-10-07 22:58:41 +02: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
f8b6033a3b Added a workaround for samefile. This fixes #600 2012-10-07 16:04:31 +02:00