#12766: custom_pk test fails with psycopg1 backend
------------------------------------------+---------------------------------
Reporter: kmtracey | Owner: nobody
Status: new | Milestone: 1.2
Component: Database layer (models, ORM) | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------------------+---------------------------------
{{{
F
======================================================================
FAIL: Doctest: modeltests.custom_pk.models.__test__.API_TESTS
----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\u\kmt\django\trunk\django\test\_doctest.py", line 2180, in
runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for
modeltests.custom_pk.models.__test__.API_TESTS
File "D:\u\kmt\django\trunk\tests\modeltests\custom_pk\models.py", line
unknown line number, in API_TESTS
----------------------------------------------------------------------
File "D:\u\kmt\django\trunk\tests\modeltests\custom_pk\models.py", line ?,
in modeltests.custom_pk.models.__test__.API_T
ESTS
Failed example:
try:
sid = transaction.savepoint()
Employee.objects.create(employee_code=123, first_name='Fred',
last_name='Jones')
transaction.savepoint_commit(sid)
except Exception, e:
if isinstance(e, IntegrityError):
transaction.savepoint_rollback(sid)
print "Pass"
else:
print "Fail with %s" % type(e)
Expected:
Pass
Got:
Fail with <class 'django.db.utils.DatabaseError'>
}}}
Followed by a bunch more errors resulting from the uncleared error on the
connection.
--
Ticket URL: <http://code.djangoproject.com/ticket/12766>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.