summaryrefslogtreecommitdiff
path: root/tests/modeltests
AgeCommit message (Collapse)Author
2012-04-14Converted more test assertions to assert[Not]Contains.Claude Paroz
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-11Fixed #17439 -- Prevented spurious queries for missing objects after ↵Aymeric Augustin
prefetch_related has run. That affects nullable foreign key, nullable one-to-one, and reverse one-to-one relations. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-10Fixed #18090 -- Applied filters when running prefetch_related backwards ↵Aymeric Augustin
through a one-to-one relation. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09Fixed #18083 -- Fixed cascade deletion with proxy model of concrete ↵Carl Meyer
subclass. Thanks Simon Charette for report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31Removed deprecated URLField.verify_exists.Aymeric Augustin
The deprecation schedule was slightly accelerated because of possible security ramifications. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30Use the class decorator syntax available in Python >= 2.6. Refs #17965.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30Removed with_statement imports, useless in Python >= 2.6. Refs #17965. ↵Claude Paroz
Thanks jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-29Fixed #11150 -- Removed dependency on cStringIO in ImageField validation. ↵Claude Paroz
Thanks vvd for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-22Reverted parts of r16963 to fix a regression on the creation of permissions ↵Aymeric Augustin
on proxy models. Refs #17904. Thanks koenb for the report and claudep for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-15Fixed #17838 - prefetch_related fails for GenericForeignKeys when related ↵Luke Plant
object id is not a CharField/TextField Thanks to mkai for the report and debugging, and tmitchell and Przemek Lewandowski for their work on the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-14Added cleanup code to the proxy_model_inheritance tests. Refs #12286, #16329.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13Fixed #17882 -- Reopened the database connection when a test changes time ↵Aymeric Augustin
zone settings. Thanks brodie for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13Fixed #10498 (again) -- Made sure the improvements done in r17641 have a ↵Jannis Leidel
smaller impact on speed. Thanks to Anssi Kääriäinen for the patch and Jonas Obrist for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13Refs #17876: enhanced new test to actually test underlying function, not ↵Karen Tracey
just ensure trying to use it does not raise an exception. Thanks Przemek Lewandowski. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12Fix #17876: Corrected an exception (regression) raised where select_realted ↵Karen Tracey
and only is used on a proxy model. Thanks milosu and charettes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-03Fixed #10498 -- Fixed using ugettext_lazy values when creating model ↵Jannis Leidel
instances. Thanks to Claude Paroz and Jonas Obrist. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-01Fixed #17696 - Queryset prefetch_related() ignores using()Luke Plant
Thanks to simon29 for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-28Fixed #17668 - prefetch_related does not work in in_bulkLuke Plant
Thanks to gurets for the report, and akaariai for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-27Fixed #17755 -- Ensured datetime objects that bypass the model layer (for ↵Aymeric Augustin
instance, in raw SQL queries) are converted to UTC before sending them to the database when time zone support is enabled. Thanks Anssi for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17596 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-22Fixed #17728 -- When filtering an annotation, ensured the values used in the ↵Aymeric Augustin
filter are properly converted to their database representation. This bug was particularly visible with timezone-aware DateTimeFields. Thanks gg for the report and Carl for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-22Fixed #17678 -- Corrected setup of _meta.proxy_for_model and added ↵Carl Meyer
_meta.concrete_model. Thanks Anssi Kääriäinen. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09Fixed #10080 -- Slightly extended the fix made in r10401 by also taking ↵Jannis Leidel
command line options into account that don't have have a default set. Thanks, Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-05Fixed #11670 -- Prevented genuine model fields named 'year', 'month', 'gt', ↵Julien Phalip
'lt' etc. from being mistaken for lookup types in lookups across relations. Thanks to andy for the report, to jpwatts for the initial patch and to Anssi Kääriäinen and Alex Gaynor for the reviews. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04Fixed #8291 -- Allowed 'pk' to be used as an ordering option in ↵Julien Phalip
`Model.Meta`. Thanks to peterd12 for the report and to evan_schulz, gruszczy, frog32 and David Gouldin for their work on the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04Fixed #17602 -- Stopped the XML serializer from doing unneeded queries. ↵Jannis Leidel
Thanks, gnosek. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04Fixed #17527 -- Improved exception message when adding the wrong type of ↵Jannis Leidel
object to a ManyToManyField. Thanks, guettli and cClaude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17437 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-31Fixed #16921 -- Added assertHTMLEqual and assertHTMLNotEqual assertions, and ↵Carl Meyer
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-31Skipped the test introduced at r17403 on Python 2.5, because it requires ↵Aymeric Augustin
warnings.catch_warnings. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17413 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-28Caught (and tested) the warning added at r17393 in the corresponding test. ↵Aymeric Augustin
Refs #17580. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-24Fixed #17580 -- Made sure datetime.date instances are correctly handled when ↵Jannis Leidel
being passed to a DateTimeField fields and the timezone support is enabled by making it aware using the default timezone. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-07Fixed #17100 -- Typo in the regex for EmailValidator. Thanks reames AT ↵Aymeric Augustin
asymmetricventures com for the report and Claude Paroz for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-02Fixed #16340 -- Made `get_or_create()` re-raise any `IntegrityError` with ↵Julien Phalip
its original traceback. Thanks to d0ugal and Jonas Obrist. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-02Fixed a stupid bug in the implementation of timezone.make_aware.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17332 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-27Fixed #17463 -- Conditionally skipped tests that Windows isn't able to run.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22Added support for modifying the effect of ``DISTINCT`` clauses so theyRamiro Morales
only consider some fields (PostgreSQL only). For this, the ``distinct()`` QuerySet method now accepts an optional list of model fields names and generates ``DISTINCT ON`` clauses on these cases. Thanks Jeffrey Gelens and Anssi Kääriäinen for their work. Fixes #6422. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17Fixed various dodgy behavioursAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16Fixed #17323 -- Renamed HttpRequest.raw_post_data to request.body. Thanks ↵Adrian Holovaty
for the patch, dstufft git-svn-id: http://code.djangoproject.com/svn/django/trunk@17210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11Fixed #17251 -- In the select_for_update tests, close manually database ↵Aymeric Augustin
connections made in threads, so they don't stay "idle in transaction" until the GC deletes them. Thanks Anssi Kääriäinen for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-04Fixed #17343 -- Changed the {% now %} tag to use the current time zone when ↵Aymeric Augustin
time zone support is enabled. Thanks oinopion for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27Changed the fixtures used to test the 'initial_data' feature so they don't ↵Aymeric Augustin
contain datetimes. Refs #17275. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17154 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27Renamed the fixtures used by the aggregation tests so they're only loaded by ↵Aymeric Augustin
the tests that use them. Refs #17275. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-25Fixed #17294 -- Supported nullable DateTimeFields when time zone support is ↵Aymeric Augustin
enabled. Thanks pressureman for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21Fixed #17274 -- Accepted TIME_ZONE = None when USE_TZ = True. Thanks ↵Aymeric Augustin
pressureman for the report. This problem only occured when pytz is installed. It's still strongly recommended to define the correct time zone in TIME_ZONE in order to use pytz' implementation and not the approximation based on system time. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20Ensured that the warning added at r17117 also applies to queryset filter ↵Aymeric Augustin
arguments. Refs #17263. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17126 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20Disabled tests that require warnings.catch_warnings when running under ↵Aymeric Augustin
Python 2.5. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-19Fixed #17263 -- Added a warning when a naive datetime reaches the database ↵Aymeric Augustin
layer while time zone support is enabled. After this commit, timezones.AdminTests will raise warnings because the sessions contrib app hasn't been upgraded to support time zones yet. This will be fixed in an upcoming commit. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18Fixed #17255 -- Removed "as" prefix from new timezone template filter names ↵Jannis Leidel
for the sake of clarity. Cheers to Aymeric Augustin for bearing with me. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.Aymeric Augustin
For more information on this project, see this thread: http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-13Refs #17215: Avoid generating 47 leftover tmp dirs during a clean test run.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-12Fix #16570: Restore ability to have decimal fields where max_digits equals ↵Karen Tracey
decimal_places. Thanks dcwatson and kenth. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17089 bcc190cf-cafb-0310-a4f2-bffc1f526a37