mirror of
https://github.com/django/django.git
synced 2025-07-05 18:29:11 +00:00
queryset-refactor: Fixed a problem in the test-suite that was annoying.
Only fails on PostgreSQL and only fails on the next test. Also identified the other area that causes both PostgreSQL backends (only) to fail. Don't really understand why at the moment, but this is the culprit. Tricky to reproduce, too, you have to run "queries" and "views" together, in that order to see it. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2f2908d7b5
commit
fa11a6a128
@ -6,7 +6,7 @@ To define a one-to-one relationship, use ``OneToOneField()``.
|
||||
In this example, a ``Place`` optionally can be a ``Restaurant``.
|
||||
"""
|
||||
|
||||
from django.db import models
|
||||
from django.db import models, connection
|
||||
|
||||
class Place(models.Model):
|
||||
name = models.CharField(max_length=50)
|
||||
@ -185,4 +185,9 @@ DoesNotExist: Restaurant matching query does not exist.
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
IntegrityError: ...
|
||||
|
||||
# Because the unittests all use a single connection, we need to force a
|
||||
# reconnect here to ensure the connection is clean (after the previous
|
||||
# IntegrityError).
|
||||
>>> connection.close()
|
||||
"""}
|
||||
|
@ -537,6 +537,10 @@ Test that parallel iterators work.
|
||||
|
||||
We can do slicing beyond what is currently in the result cache, too.
|
||||
|
||||
# FIXME!! This next test causes really weird PostgreSQL behaviour, but it's
|
||||
# only apparent much later when the full test suite runs. I don't understand
|
||||
# what's going on here yet.
|
||||
|
||||
# We need to mess with the implemenation internals a bit here to decrease the
|
||||
# cache fill size so that we don't read all the results at once.
|
||||
>>> from django.db.models import query
|
||||
|
Loading…
x
Reference in New Issue
Block a user