Opened 13 years ago
Closed 13 years ago
#17268 closed Bug (fixed)
r17119 broke the cache tests under PostgreSQL on the CI server
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
I can reproduce it with Debian unstable, Postgres 9.0.5 and psycopg 2.4.2-1 -- The second cache.add in test_add fails due to a violated unique constraint (the same key already exists from the first add) and as a result of this the .get and .commit (in teardown) fails. I fixed it locally via the attached patch, but I am not sure if it's the correct way.
by , 13 years ago
Attachment: | t17268.diff added |
---|
Note:
See TracTickets
for help on using tickets.
The problem probably appeared as a consequence of the following changes:
django.test.TestCase
instead of adjango.utils.unittest.TestCase
because I wanted to apply theoverride_settings
decorator,transaction.commit()
at the end oftearDown
, otherwise the cache table isn't actually deleted, becausedjango.test.TestCase
is transactional.