On Wed, Mar 25, 2009 at 5:26 PM, Duc Nguyen <d...@nuggien.com> wrote:
> In django.test.TestCase, there is a check for > settings.DATABASE_SUPPORTS_TRANSACTIONS but no check to make sure this > setting even exists. This causes nosetests to bail out with an > AttributeError. What is the correct way to fix this? How do we check that > our db type actually supports transactions? > It's set during test database creation by create_test_db in django/db/backends/creation.py. I'm not familiar with nosetests but I guess it does not use this routine? The implementation in creation.py tests to see whether a call to rollback actually has the effect of rolling back an uncommitted insert. It's not pretty but I didn't know how else to test it, since rollback on MySQL/MyISAM for instance, doesn't raise an error but just doesn't have any effect. Karen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---