(Originally posted August 9, 2013)
I was working on a little messaging app for a Django site and I had a little error when performing tests. I had named the app “messages” considering that was the function performed. Well Django also has a built in app named “messages as well. This app allows for messages to be sent to users notifying them of site updates and things like. Not the same functionality as what I was building. So when I wanted to run the tests on my messaging app,
$ python manage.py test messages
Django picked their built in app to run the tests agains, all of which took way longer than my app’s tests should have.
The fix for this is really easy, just make sure that Django’s messaging app is listed below the custom app since Django’s manage.py module stops when it finds a name match. This actually brings up a better point that you should probably just avoid duplicate names in the first place.