Testing unmanaged models - a cleaner approach

TL;DR: Instead of monkey-patching the Django TestSuiteRunner to treat unmanaged models as managed, we instead manually create the tables during test-time using the SchemaEditor.

I wrote a blog post explaining my approach: Unit-Testing Unmanaged Models — Django | by Emmanuel Katchy | Dev Genius

Happy to get comments and corrections. Thanks!

1 Like