From 89a79f45ff7bedc6ec4bb252eba84c90fdb2ce2d Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sat, 11 Jun 2022 18:30:18 +0530 Subject: [PATCH] fix: management command runner expects classes named "Command" --- accounts/management/commands/rm_unverified_users.py | 2 +- accounts/tests.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/accounts/management/commands/rm_unverified_users.py b/accounts/management/commands/rm_unverified_users.py index b020795..e70dc60 100644 --- a/accounts/management/commands/rm_unverified_users.py +++ b/accounts/management/commands/rm_unverified_users.py @@ -19,7 +19,7 @@ from django.conf import settings from accounts.models import AccountConfirmChallenge -class CleanUnverifiedUsersCommand(BaseCommand): +class Command(BaseCommand): help = "Deletes unverified users after the period specified in settings.py" def handle(self, *args, **options): diff --git a/accounts/tests.py b/accounts/tests.py index 3c3b560..3a35a75 100644 --- a/accounts/tests.py +++ b/accounts/tests.py @@ -23,7 +23,9 @@ from django.contrib.auth import authenticate from django.conf import settings from .models import AccountConfirmChallenge -from .management.commands.rm_unverified_users import CleanUnverifiedUsersCommand +from .management.commands.rm_unverified_users import ( + Command as CleanUnverifiedUsersCommand, +) class LoginTest(TestCase):