On 05/09/12 16:28, Mike Dewhirst wrote:
I asked about this a couple of weeks ago and the correct solution is to use a 
TransactionTestCase

Hi Mike,

I don't want to be explicitly test transactional behaviour, which I think is 
the intention behind TransactionTestCase. I just want each test running a 
transaction which rolls back on teardown. The django documentation for TestCase 
seems to suggest that TestCase should provide the behaviour I'm wanting:

class TestCase
Wraps each test in a transaction.

https://docs.djangoproject.com/en/dev/topics/testing/#testcase

Explicitly calling connection._rollback() in a TransactionTestCase 
unfortunately has the same behaviour and only calls ROLLBACK on the 'default' 
database.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to