summaryrefslogtreecommitdiff
path: root/tests/modeltests
AgeCommit message (Collapse)Author
2012-08-07[py3] Fixed access to dict keys/values/items.Aymeric Augustin
2012-08-04Fixed #5524 -- Do not remove cleaned_data when a form fails validationClaude Paroz
cleaned_data is no longer deleted when form validation fails but only contains the data that did validate. Thanks to the various contributors to this patch (see ticket).
2012-07-22[py3] Added Python 3 compatibility for xrange.Aymeric Augustin
2012-07-22[py3] Updated urllib/urllib2/urlparse imports.Aymeric Augustin
Lots of functions were moved. Use explicit imports in all cases to keey it easy to identify where the functions come from.
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-07-22[py3] Replaced basestring by six.string_types.Aymeric Augustin
2012-07-22[py3] Fixed remaining Python 3 syntax errors.Aymeric Augustin
django.utils.unittest.* weren't touched -- they're only imported on Python 2.6.
2012-07-22[py3] Removed longs.Aymeric Augustin
2012-07-17Fixed #17497 -- Corrected FieldError message in add_fields()Anssi Kääriäinen
The erroneous message was user visible in values_list() calls. Thanks to ojii for report and review, and to antoviaque for the patch.
2012-07-16Fixed #18056 - Cleared aggregations on DateQuery.add_date_selectNuno Maltez
Cleared aggregations on add_date_select method so only distinct dates are returned when dealing with a QuerySet that contained aggregations. That would cause the query set to return repeated dates because it would look for distinct (date kind, aggregation) pairs.
2012-07-05Fixed #18362 - Made model.save() update_fields accept attnamesAndrei Antoukh
2012-07-03Fixed widget parent class in generic_relations testClaude Paroz
2012-07-01Fixed some locations to work with autocommit=TrueAnssi Kääriäinen
- backends: supports_transactions() - select_for_update tests
2012-06-26Fixed #18515 -- Conditionally regenerated filename in FileField validationClaude Paroz
When a FileField value has been saved, a new validation should not regenerate a new filename when checking the length. Refs #9893.
2012-06-26Fixed #17485 -- Made defer work with select_relatedAnssi Kääriäinen
This commit tackles a couple of issues. First, in certain cases there were some mixups if field.attname or field.name should be deferred. Field.attname is now always used. Another issue tackled is a case where field is both deferred by .only(), and selected by select_related. This case is now an error. A lot of thanks to koniiiik (Michal Petrucha) for the patch, and to Andrei Antoukh for review.
2012-06-19Removed unneeded u prefixesClaude Paroz
2012-06-09Fixed #17159 -- Validated returned number of next|previous_page_numberClaude Paroz
Thanks mehta.apurva at gmail.com for the report and the initial patch and neaf for the complete patch.
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-06-07Added more precise assertions on two fixture tests.Claude Paroz
2012-06-07Fixed #10200 -- Raised CommandError when errors happen in loaddata.Claude Paroz
2012-06-06Prevented TestNoInitialDataLoading to pollute other tests (Refs #15926)Claude Paroz
Tests were still failing with MySQL. It seems a rollback is solving the issue.
2012-06-06Fixed #18309 - Prefetch related does not work for fkey to multitable ↵Luke Plant
inherited model Thanks to milosu for the report, tests and initial patch.
2012-06-06Made TestNoInitialDataLoading pass with MySQL (Refs #15926)Claude Paroz
2012-06-05Fixed #15926 -- Added option --no-initial-data to syncdb and flush.Honza Kral
Thanks msiedlarek, jpaugh64 and vlinhart!
2012-05-31Fixed #18407 -- Made model field's to_python methods fully accept unicode.Claude Paroz
When generating error message in to_python, any unicode string containing non-ascii characters triggered a UnicodeEncodeError for most field types.
2012-05-31Rewrote test_error_messages with helper test utility.Claude Paroz
2012-05-31Fixed #14681 -- Do not set mode to None on file-like objects.Claude Paroz
gzip.GzipFile does not support files with mode set to None.
2012-05-27Fixed #18387 -- Do not call sys.exit during call_command.Claude Paroz
Moved sys.exit(1) so as failing management commands reach it only when running from command line.
2012-05-27Fixed #18343 -- Cleaned up deferred model implementationAnssi Kääriäinen
Generic cleanup and dead code removal in deferred model field loading and model.__reduce__(). Also fixed an issue where if an inherited model with a parent field chain parent_ptr_id -> id would be deferred loaded, then accessing the id field caused caused a database query, even if the id field's value is already loaded in the parent_ptr_id field.
2012-05-26Fixed #5423 -- Made dumpdata output one row at a time.Claude Paroz
This should prevent storing all rows in memory when big sets of data are dumped. See ticket for heroic contributors.
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-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-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-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-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-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-05Made more extensive usage of context managers with open.Claude Paroz
2012-05-03Replaced deprecated TestCase methods. Refs #17049.Claude Paroz
2012-05-02Merge pull request #28 from akaariai/ticket_18163Karen Tracey
Ticket 18163 - use faster password hasher in tests.
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-30Ensured tests pass using custom PASSWORD_HASHERS.Anssi Kääriäinen
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.
2012-04-29Simplified timezones tests with settings_changed.Aymeric Augustin
All relevant state is now properly reset whenever TIME_ZONE or USE_TZ are changed in tests.
2012-04-20Fixed #10494 -- Added kwargs to QuerySet.get() error message in the case no ↵Anssi Kääriäinen
objects were found. Thanks brondsem for the report, Szymon Pyzalski for the patch and oinopion for review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17917 bcc190cf-cafb-0310-a4f2-bffc1f526a37