Testing Django Admin Commands

Make sure your commands don’t break

Commands in Django allow you to write scripts for your application that you can run from the command line, using manage.py. Recently, I needed to write unit tests for custom Django commands.

This is the quick guide I wish I’d found first thing…

Why test custom commands?

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bennett Garner

Bennett Garner

DeveloperPurpose.com — Email course on how to build a tech career with meaning and purpose 💻 Top writer in technology ✍️