Karen Tracey wrote:
> For the most part this change should be invisible, except for the speed 
> improvement when running tests.  However, if you have tests that need to 
> actually test the effects of transaction commit or rollback, you will 
> now need to use a django.test.TransactionTestCase instead of a 
> django.test.TestCase.

Just ran the new code with our tests and about 2/3 of them became 
broken. My first hypothesis is it's caused by testing views with 
self.client. We use TransactionMiddleware that explicitly commits 
transaction on view's successful return. So the first test that does 
"self.client.get(...)" leaves fixtures data in the database and all 
subsequent attempts to load the same fixtures are failing.

Now I'm thinking about somehow disabling TransactionMiddleware from 
within test environment. But is seems hacky...

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

Reply via email to