On 8/12/07, Ned <[EMAIL PROTECTED]> wrote: > > Firstly, is a mixin a good way to do this?
This is one approach - another would be an abstract base class. We (by which, I mean Malcolm) is currently working on improving the inheritance capabilities in Django - providing a way to cleanly implement abstract base classes is one of the goals of this work. > But management.syncdb() doesn't create any tables, which is because it > doesn't have any INSTALLED_APPS. But I don't have any django apps, > just a handful of testing classes. If you're going to test some functionality with mixins, you're going to need a test application with some test models; those test apps/models are what gets installed with a syncdb. The simplest approach would be to write a simple test app, use the normal Django test framework on that app, and then not install/include that test app as part of an end-users installation. Django's own system tests are a reasonable guide, here. The model tests and regression tests are 'test apps' that have sample models for testing specific behaviours. The 'runtests.py' script mocks up an INSTALLED_APPS setting that syncdb can use. However, there is no need for the tests directory to be distributed to end user installations. Have a look at runtests.py and see if you get any inspiration. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---