summaryrefslogtreecommitdiff
path: root/tests/regressiontests
AgeCommit message (Collapse)Author
2013-01-08Updated deprecated test assertionsClaude Paroz
2013-01-08Fixed #16759 -- Remove use of __deepcopy__ in qs.clone()Anssi Kääriäinen
The original problem was that queryset cloning was really expensive when filtering with F() clauses. The __deepcopy__ went too deep copying _meta attributes of the models used. To fix this the use of __deepcopy__ in qs cloning was removed. This commit results in some speed improvements across the djangobench benchmark suite. Most query_* tests are 20-30% faster, save() is 50% faster and finally complex filtering situations can see 2x to order of magnitude improvments. Thanks to Suor, Alex and lrekucki for valuable feedback.
2013-01-07Created special PostgreSQL text indexes when unique is TrueClaude Paroz
Refs #19441.
2013-01-06Fixed #19173 -- Made EmptyQuerySet a marker class onlyAnssi Kääriäinen
The guarantee that no queries will be made when accessing results is done by new EmptyWhere class which is used for query.where and having. Thanks to Simon Charette for reviewing and valuable suggestions.
2013-01-04Fixed #19192 -- Allowed running tests with dummy db backendClaude Paroz
Thanks Simon Charette for the initial patch, and Jan Bednařík for his work on the ticket.
2013-01-03Fixed #19382 -- Stopped smtp backend raising exception when already closedClaude Paroz
Thanks Sebastian Noack for the report and the initial patch.
2013-01-03Fixed #19134 -- Allowed closing smtp backend when the server is stoppedClaude Paroz
Thanks Sebastian Noack for the report and the initial patch.
2013-01-03Fixed #19545 -- Make sure media/is_multipart work with empty formsetsSimon Charette
2013-01-01Modernized middleware tests.Aymeric Augustin
* Used override_settings consistently -- changes to DEBUG could leak. * Took advantage of assertRaisesRegexp. * Fixed indentation -- some code was indented at 2 spaces.
2013-01-01Fixed #19457 -- ImageField size detection failed for some files.Anton Baklanov
This was caused by PIL raising a zlib truncated stream error since we fed the parser with chunks instead of the whole image.
2013-01-01Fixed #19519 again -- Regression in LiveServerTestCase after fd1279a4.Aymeric Augustin
2012-12-31Fixed #19453 -- Ensured that the decorated function's arguments are ↵Julien Phalip
obfuscated in the @sensitive_variables decorator's frame, in case the variables associated with those arguments were meant to be obfuscated from the decorated function's frame. Thanks to vzima for the report.
2012-12-31Fixed #19519 -- Fired request_finished in the WSGI iterable's close().Aymeric Augustin
2012-12-31Fixed #19537 -- Made CheckboxInput._has_changed handle 'False' stringClaude Paroz
Thanks dibrovsd@gmail.com for the report.
2012-12-30Added further flexibility to ModelAdmin for controlling post-save redirections.Julien Phalip
Refs #19505.
2012-12-29Silenced warnings in the tests of deprecated features.Aymeric Augustin
2012-12-29Advanced pending deprecation warnings.Aymeric Augustin
Also added stacklevel argument, fixed #18127.
2012-12-29Removed legacy ways of calling cache_page.Aymeric Augustin
2012-12-29Removed truncate_words and truncate_html_words.Aymeric Augustin
2012-12-29Removed HttpRequest.raw_post_data.Aymeric Augustin
2012-12-29Removed django.core.management.setup_environ and execute_manager.Aymeric Augustin
2012-12-29Removed django.contrib.localflavor.Aymeric Augustin
Each localflavor lives on as a separate app.
2012-12-29Removed interpolation of post_url_continue in the admin.Aymeric Augustin
2012-12-29Removed backwards-compatibility shim for #16288.Aymeric Augustin
Also unit-tested django.utils.log.RequireDebugTrue for consistency.
2012-12-29Avoided having an indexed TextField installed unless using postgresAnssi Kääriäinen
An index on TextField results in a warning message when running tests on MySQL or SQLite, and the test using the TextField was PostgreSQL only in any case.
2012-12-28Fix #19524 -- Incorrect caching of parents of unsaved model instances.Aymeric Augustin
Thanks qcwxezdas for the report. Refs #13839.
2012-12-24Expanded tests added when fixing #14529.Ramiro Morales
To make sure changes in 35d1cd0 don't break anything. Refs #19505.
2012-12-24Prevented caching of streaming responses.Aymeric Augustin
The test introduced in 4b278131 accidentally passed because of a limitation of Python < 3.3. Refs #17758, #7581.
2012-12-24Fixed #19505 -- A more flexible implementation for customizable admin ↵Julien Phalip
redirect urls. Work by Julien Phalip. Refs #8001, #18310, #19505. See also 0b908b92a2ca4fb74a103e96bb75c53c05d0a428.
2012-12-24Fixed a randomly failing test under Python 3.Aymeric Augustin
Refs #17758.
2012-12-24Fixed a dependence on set-ordering in testsLuke Plant
2012-12-24Made admin generated changelist URLs independent of dict orderingLuke Plant
2012-12-24Don't rely on dictionary ordering in testsIan Clelland
2012-12-24Use HTML parser to compare html snippetsIan Clelland
2012-12-24Use new TestCase methods for equality comparisonsIan Clelland
2012-12-22Fixed #19468 -- Decoded request.path correctly on Python 3.Aymeric Augustin
Thanks aliva for the report and claudep for the feedback.
2012-12-20Fixed #18854 -- Join promotion in disjunction casesAnssi Kääriäinen
The added promotion logic is based on promoting any joins used in only some of the childs of an OR clause unless the join existed before the OR clause addition.
2012-12-20Fixed #19500 -- Solved a regression in join reuseAnssi Kääriäinen
The ORM didn't reuse joins for direct foreign key traversals when using chained filters. For example: qs.filter(fk__somefield=1).filter(fk__somefield=2)) produced two joins. As a bonus, reverse onetoone filters can now reuse joins correctly The regression was caused by the join() method refactor in commit 68847135bc9acb2c51c2d36797d0a85395f0cd35 Thanks for Simon Charette for spotting some issues with the first draft of the patch.
2012-12-20Fixed #19401 -- Ensure that swappable model references are case insensitive.Russell Keith-Magee
This is necessary because get_model() checks are case insensitive, and if the swapable check isn't, the swappable logic gets tied up in knots with models that are partially swapped out. Thanks to chris@cogdon.org for the report and extensive analysis, and Preston for his work on the draft patch.
2012-12-18Fixed #19441 -- Created PostgreSQL varchar index when unique=TrueClaude Paroz
Thanks Dylan Verheul for the report and Anssi Kääriäinen for the review.
2012-12-16Made sure connections are actually closed in backends testsAnssi Kääriäinen
2012-12-16Fixed #19483 -- Improved import error message in contrib.commentsClaude Paroz
Thanks Valentin Lorentz for the report and the suggested fix.
2012-12-16Fixed #10790 -- Refactored sql.Query.setup_joins()Anssi Kääriäinen
This is a rather large refactoring. The "lookup traversal" code was splitted out from the setup_joins. There is now names_to_path() method which does the lookup traveling, the actual work of setup_joins() is calling names_to_path() and then adding the joins found into the query. As a side effect it was possible to remove the "process_extra" functionality used by genric relations. This never worked for left joins. Now the extra restriction is appended directly to the join condition instead of the where clause. To generate the extra condition we need to have the join field available in the compiler. This has the side-effect that we need more ugly code in Query.__getstate__ and __setstate__ as Field objects aren't pickleable. The join trimming code got a big change - now we trim all direct joins and never trim reverse joins. This also fixes the problem in #10790 which was join trimming in null filter cases.
2012-12-16Corrected tests depending on the error message on the AuthenticationForm.Russell Keith-Magee
Refs #19368, and the fix introduced in 27f8129d64292868f6a328f7bf9a1bed67967ff3.
2012-12-13Fixed a couple of stale tests caused by patch for #19462Anssi Kääriäinen
Commit was 088d3bc2f84b6b68fee7e5de053b58049bd110e7
2012-12-13Fixed #19462 -- Made assertQuerysetEqual detect undefined orderingAnssi Kääriäinen
If there are more than one values to compare against and the qs isn't ordered then assertQuerysetEqual will raise a ValueError.
2012-12-11Fixed an order dependant test failure.Florian Apolloner
2012-12-10Fixed a test failure in the comment tests.Florian Apolloner
2012-12-10Fixed a security issue in get_host.Florian Apolloner
Full disclosure and new release forthcoming.
2012-12-10Fixed #18856 -- Ensured that redirects can't be poisoned by malicious users.Florian Apolloner