Commit Graph

29 Commits

Author SHA1 Message Date
Claude Paroz 8248d14029 Removed US localflavor-specific tests from core
Also fixes #9045.
2012-12-08 21:07:59 +01:00
Claude Paroz c91667338a Fixed #19357 -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-12-08 11:13:52 +01:00
Anton I. Sipos fdea2621cd Fixed #18949 -- Fix broken test interactions in ModelForms tests
A test in Model Forms test was specifically referring to a fixed
primary key, which was now being used up in a newly committed.
This has been worked around by specifying a higher primary
key.
2012-11-04 18:43:11 -08:00
Anton I. Sipos e44ab5bb4f Fixed #18949 -- Improve performance of model_to_dict with many-to-many
When calling model_to_dict, improve performance of the generated SQL by
using values_list to determine primary keys of many to many objects. Add
a specific test for this function, test_model_to_dict_many_to_many

Thanks to brian for the original report and suggested fix.
2012-11-04 15:52:05 -08:00
Stephen Burrows 218abcc9e5 Fixed #14567 -- Made ModelMultipleChoiceField return EmptyQuerySet as empty value 2012-10-03 20:47:35 +03:00
Chris Lawlor 450c0df653 [py3] Fixed modeltests.model_forms tests. 2012-08-14 23:46:23 +02:00
Claude Paroz 121fd109de Fixed #5524 -- Do not remove cleaned_data when a form fails validation
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-08-04 14:22:23 +02:00
Aymeric Augustin bdca5ea345 [py3] Replaced unicode/str by six.text_type/bytes. 2012-07-22 09:29:54 +02:00
Claude Paroz 4a103086d5 Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz 38408f8007 Marked bytestrings with b prefix. Refs #18269
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
2012-05-19 17:43:34 +02:00
Claude Paroz d7dfab59ea Replaced cStringIO.StringIO by io.BytesIO.
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Claude Paroz 9383a2761c Removed with_statement imports, useless in Python >= 2.6. Refs #17965. Thanks jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Claude Paroz 159d1be656 Fixed #11150 -- Removed dependency on cStringIO in ImageField validation. Thanks vvd for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-29 16:49:59 +00:00
Carl Meyer 844a24bbb9 Fixed #16921 -- Added assertHTMLEqual and assertHTMLNotEqual assertions, and converted Django tests to use them where appropriate. Thanks Greg Müllegger.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-31 20:36:11 +00:00
Alex Gaynor d5a45d79fe Convert all modeltests to use absolute imports, rather than relative ones.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 18:04:12 +00:00
Ian Kelly 21a449168b Fixed #16645: fixed a broken test to work in Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16919 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-30 21:40:56 +00:00
Ramiro Morales 4df45418f2 Fixed #16644 -- Fixed one additional test that was failing in Oracle due to false assumptions about the primary keys of objects. Thanks Aymeric Augustin for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-21 18:09:08 +00:00
Russell Keith-Magee c013c07ed7 Fixed #16243 -- Corrected test suite failure in model_forms when PIL isn't installed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-13 13:23:49 +00:00
Russell Keith-Magee 4189561820 Fixed #16210 -- Added some missing __future__ imports to support with statements on 2.5. Thanks to Julien Phalip for the report and patch
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 14:49:44 +00:00
Russell Keith-Magee aa5506d6f6 Fixed #16198 -- Ported the model_forms doctests. Our long national nightmare is over. Oh, and we have always been at war with doctests. Thanks to Peter van Kampen and Gregor Müllegger for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 14:08:51 +00:00
Alex Gaynor e5dfc6cf94 Revert [15653], which was absolutely not ready to be committed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15655 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-26 08:50:15 +00:00
Alex Gaynor 380906b946 Beginnings of test conversion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-26 08:49:01 +00:00
Ramiro Morales 730769d1af Fixed #14951 -- Made the unique_for_{date,month,year} model field constraints to not fail when the related DateField is empty.
Existing modelforms tests were extended to cover this case and an equivalent set of tests was added for the model functionality.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-09 13:26:39 +00:00
Russell Keith-Magee 015d85aee6 Fixed #14102 -- Ensure that fields that have been excluded from a form aren't included in the unique_for_* checks, either. Thanks to Travis Cline for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-17 07:07:28 +00:00
Karen Tracey 7471dab660 Fixed #13138: Ensure required=False on a model form field overrides
blank=False on the underlying model field during model form clean, 
in order to maintain backward compatibility. Thanks to saxon75 for 
the report.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-18 02:03:07 +00:00
Karen Tracey 47a822207f Fixed #12881: Corrected handling of inherited unique constraints. Thanks for report fgaudin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16 19:32:11 +00:00
Joseph Kocherhans e488c1dc0d Fixed #12901. Again. Model validation will not be performed on excluded fields that were overridden in the form. Thanks, ammarr.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-25 17:18:27 +00:00
Joseph Kocherhans eb0751a4c0 Fixed #12901. Exclude overridden form fields from model field validation. Thanks, Honza Král.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-22 23:06:09 +00:00