I need to write some unit tests for an abstract base model, that provides some basic functionality that should be used by other apps. It it would be necessary to define a mo
I came to this problem my self and my solution is on this gist django-test-abstract-models
you can use it like this:
1- subclass your django abstract models
2- write your test case like this:
class MyTestCase(AbstractModelTestCase):
self.models = [MyAbstractModelSubClass, .....]
# your tests goes here ...
3- if you didn't provide self.models
attribute it will search the current app for models in the path myapp.tests.models.*