summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2012-05-25Added tests for nested exclude/negate queriesAnssi Kääriäinen
2012-05-24Fixed qs.order_by() join promotion for already existing joinsAnssi Kääriäinen
When order_by causes new joins to be added to the query, the joins must be LEFT OUTER joins for nullable relations, otherwise the order_by could cause the results to be altered. This commit fixes the logic to only promote new joins, previously all joins in the order_by lookup path were promoted. Thanks to Bruno Desthuilliers for spotting this corner case.
2012-05-24Fixed #18177 -- Cached known related instances.Aymeric Augustin
This was recently fixed for one-to-one relations; this patch adds support for foreign keys. Thanks kaiser.yann for the report and the initial version of the patch.
2012-05-24Fixed #18353 -- Inconsistency in date-based CBVs.Aymeric Augustin
2012-05-22Fixed #18319 -- Added 'supports_sequence_reset' DB featureAnssi Kääriäinen
Added a new feature to allow 3rd party backends to skip tests which test sequence resetting. Thanks to manfre for report and patch.
2012-05-22Fixed #18318 -- Changed some tests to be 3rd party DB friendlyAnssi Kääriäinen
Thanks to manfre for report and patch.
2012-05-22Fixed #18317 -- Removed db specific raw SQL function from testsAnssi Kääriäinen
A test in model_fields used LEN() in raw SQL. This function is not available on some 3rd party backends. I removed this function and ensured that the test works correctly (breaks pre e9bbdb39de) with the change.
2012-05-22Fixed #18304 -- Optimized save() when update_can_self_select=FalseAnssi Kääriäinen
Databases with update_can_self_select = False (MySQL for example) generated non-necessary queries when saving a multitable inherited model, and when the save resulted in update.
2012-05-20Fixed #18354 -- Performance issue in CBV.Aymeric Augustin
Prevented repeating a query twice when the model isn't ordered by -date_field (in Meta), allow_empty is False and pagination isn't enabled.
2012-05-19Marked bytestrings with b prefix. Refs #18269Claude Paroz
This is a preparation for unicode literals general usage in Django (Python 3 compatibility).
2012-05-19Fixed #18325 -- Wrapped self.stdout/stderr in OutputWrapper classClaude Paroz
2012-05-18Fixed broken ES localflavor test after 4774875.Claude Paroz
2012-05-18Fixed #18334 -- Fixed detection of supports_stddev backend feature.Claude Paroz
Thanks to Michael Manfre for the report and Anssi Kääriäinen for the review.
2012-05-17Added a test for DayArchiveView. Refs #17192.Aymeric Augustin
2012-05-17Fixed #9893 -- Validated the length of file namesAymeric Augustin
after the full file name is generated by the storage class. Thanks Refefer for the report, carsongee for the patch, and everyone else involved in the discussion.
2012-05-17Fixed #17449 -- Added OPTIONS to generic views.Aymeric Augustin
Thanks estebistec for the report and patch.
2012-05-17Fixed #17535 -- Optimized list generic views.Aymeric Augustin
When allow_empty is False, prevented the view from loading the entire queryset in memory when pagination is enabled.
2012-05-17Fixed #18326 -- Stripped ending chars in LiveServerViews tests.Claude Paroz
Ending chars might be different depending on git crlf setting. Thanks Michael Manfre for the report and the patch.
2012-05-16Fixed #17896 -- Added file_hash method to CachedStaticFilesStorage to be ↵Jannis Leidel
able to customize the way the hashed name of a file is created. Thanks to mkai for the initial patch.
2012-05-14Fixed #10890: added prev/next_week in the contextAymeric Augustin
of per-week date-based generic views. Thanks ee_lars for the report.
2012-05-12Replaced im_func and im_self by __func__ and __self__.Claude Paroz
The new names are Python 3 compatible.
2012-05-12Added missing relative imports in test files.Claude Paroz
2012-05-12Avoided test failure on MySQL by skipping a failing testAnssi Kääriäinen
MySQL generates an extra query in inheritance cases when doing an update. This results in a test failure when checking for number of queries in update_only_fields tests. Added a skip temporarily to avoid this test failure. Refs #18304.
2012-05-12Fixed #4102 -- Allow update of specific fields in model.save()Andrei Antoukh
Added the ability to update only part of the model's fields in model.save() by introducing a new kwarg "update_fields". Thanks to all the numerous reviewers and commenters in the ticket
2012-05-10Fixed #17798 -- Tweaked the CA localflavor.Aymeric Augustin
Thanks shelldweller.
2012-05-10Replaced foo.next() by next(foo).Claude Paroz
This new syntax for next() has been introduced in Python 2.6 and is compatible with Python 3.
2012-05-09Fix proxy model Query.remove_inherited_models()Anssi Kääriäinen
Fixed #18248 -- proxy models were added to included_inherited_models in sql.query.Query. The variable is meant to be used for multitable inheritance only. This mistake caused problems in situations where proxy model's query was reused.
2012-05-07Made model fields comparable to other objectsSimon Charette
Fixed #17851 -- Added __lt__ and @total_ordering to models.Field, made sure these work correctly on other objects than Field, too.
2012-05-05Replaced cStringIO.StringIO by io.BytesIO.Claude Paroz
Also replaced StringIO.StringIO by BytesIO in some other appropriate places. StringIO is not available in Python 3.
2012-05-05Commented on a line that inadvertantly slipped in commit 865cd35cClaude Paroz
Ignoring __pycache__ directories fixes #17393 and prepare testing with Python 3.
2012-05-05Made more extensive usage of context managers with open.Claude Paroz
2012-05-03Inserted more simplefilter calls to be sure warnings are emitted.Claude Paroz
Thanks to Florian Apolloner for suggesting the patch.
2012-05-03Made warning assertions work with or without -Wall python switchClaude Paroz
2012-05-03Used catch_warnings instead of save/restore methods. Refs #17049.Claude Paroz
2012-05-03Removed unused file from i18n regression tests.Ramiro Morales
2012-05-03Replaced deprecated TestCase methods. Refs #17049.Claude Paroz
2012-05-03Fixed #18042 -- Advanced deprecation warnings.Aymeric Augustin
Thanks Ramiro for the patch.
2012-05-02Merge pull request #28 from akaariai/ticket_18163Karen Tracey
Ticket 18163 - use faster password hasher in tests.
2012-05-01Fixed tests for date-based generic views.Aymeric Augustin
2012-05-01Fixed #17742 -- Handled aware datetimes in DateFieldAymeric Augustin
Converted aware datetimes to the default time zone before using them in the context of a DateField.
2012-04-30Use faster password hasher in sqlite testsAnssi Kääriäinen
Fixed #18163
2012-04-30Ensured tests pass using custom PASSWORD_HASHERS.Anssi Kääriäinen
2012-04-30Fixed #4746 -- Allowed spaces around filter separator.Aymeric Augustin
2012-04-30Fixed #18217 -- Time zone support in generic viewsAymeric Augustin
Introduced a distinct implementation depending on the type of the date field (DateField or DateTimeField), and applied appropriate conversions is the latter case, when time zone support is enabled.
2012-04-30Replaced print statement by print function (forward compatibility syntax).Claude Paroz
2012-04-30Fixed SortedDict.__copy__()Anssi Kääriäinen
Fixed #18175 -- Calling SortedDict.__copy__() resulted in changes to the original dictionary. The reason was likely related to subclassing dict. Thanks to linovia for report and patch.
2012-04-30Made get_indexes() consistent across backends.Anssi Kääriäinen
Fixed #15933, #18082 -- the get_indexes() method introspection was done inconsitently depending on the backend. For example SQLite included all the columns in the table in the returned dictionary, while MySQL introspected also multicolumn indexes. All backends return now consistenly only single-column indexes. Thanks to andi for the MySQL report, and ikelly for comments on Oracle's get_indexes() changes.
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29Fixed #18023 -- Removed bundled simplejson.Aymeric Augustin
And started the deprecation path for django.utils.simplejson. Thanks Alex Ogier, Clueless, and other contributors for their work on the patch.
2012-04-29Fixed an Oracle-specific test case failureAnssi Kääriäinen
Made a test checking ORM-generated query string case-insensitive.