Hi I'm currently working on a project where I don't use db.* and I met a problem during testing. As django.test.testcases.TestCase [1] inherits from TransactionTestCase, it complains about "ImproperlyConfigured: settings.DATABASES". A solution is to fall back to SimpleTestCase (which TransactionTestCase inherits from), but this class doesn't contain useful test helpers, which aren't in any way related to db handling:
* assertRedirects * assert(Not)Contains * assertFormError * assertTemplate(Not)Used * _urlconf_setup(teardown). Is there a reason why these functions were bound to a transaction handling test class instead of SimpleTestCase? My proposal is to move them out either to SimpleTestCase, or a separate class other tests (including TransactionTestCase) can inherit from. I have experimentally written a SimpleTestCase based class for my needs, but I haven't yet tested it against the Django suite. What do you think? If you agree and/or have some ideas, I will submit an issue and work on a patch proposal. [1] https://github.com/django/django/blob/master/django/test/testcases.py Cheerz, Jakub Zalewski -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
