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?

--

--

--

Top writer in Technology | Backend Web Developer | bennettgarner.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Getting started with Kubernetes

7 (not so secret) secrets about headless CMS

Normalization in DBMS

Branding The Right Flutter AppBar

How To Be Hyper-Productive & Avoid Multi User Database Issues With Cost Estimating Software.

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

Top writer in Technology | Backend Web Developer | bennettgarner.com

More from Medium

How To Manage Static Files in Your Django Project

Setting Up Django App

From Zero to Hero Django Admin: Advanced-Level ModelAdmin Class-1 (Part3)

Django MTV In VS Code