summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/management/commands
diff options
context:
space:
mode:
authorMaxime Turcotte <maxime.turcotte@savoirfairelinux.com>2014-06-17 19:07:54 -0400
committerTim Graham <timograham@gmail.com>2014-06-19 08:54:59 -0400
commit9996158db467f9bef8243fcc36dc3602570e3613 (patch)
treebf3b5cb36e3083b84de592d6e9da4fd2d131c5f4 /tests/admin_scripts/management/commands
parent63670a474c14b1989f1a3f4ee7fd0fbacb5a764a (diff)
Fixed #22835 -- Deprecated NoArgsCommand.
Diffstat (limited to 'tests/admin_scripts/management/commands')
-rw-r--r--tests/admin_scripts/management/commands/color_command.py6
-rw-r--r--tests/admin_scripts/management/commands/noargs_command.py8
-rw-r--r--tests/admin_scripts/management/commands/validation_command.py6
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/admin_scripts/management/commands/color_command.py b/tests/admin_scripts/management/commands/color_command.py
index dda2cc826d..5a1c297762 100644
--- a/tests/admin_scripts/management/commands/color_command.py
+++ b/tests/admin_scripts/management/commands/color_command.py
@@ -1,9 +1,9 @@
-from django.core.management.base import NoArgsCommand
+from django.core.management.base import BaseCommand
-class Command(NoArgsCommand):
+class Command(BaseCommand):
help = "Test color output"
requires_system_checks = False
- def handle_noargs(self, **options):
+ def handle(self, **options):
return self.style.SQL_KEYWORD('BEGIN')
diff --git a/tests/admin_scripts/management/commands/noargs_command.py b/tests/admin_scripts/management/commands/noargs_command.py
index 3a75098c71..c95f7c1844 100644
--- a/tests/admin_scripts/management/commands/noargs_command.py
+++ b/tests/admin_scripts/management/commands/noargs_command.py
@@ -1,9 +1,9 @@
-from django.core.management.base import NoArgsCommand
+from django.core.management.base import BaseCommand
-class Command(NoArgsCommand):
+class Command(BaseCommand):
help = "Test No-args commands"
requires_system_checks = False
- def handle_noargs(self, **options):
- print('EXECUTE:NoArgsCommand options=%s' % sorted(options.items()))
+ def handle(self, **options):
+ print('EXECUTE: noargs_command options=%s' % sorted(options.items()))
diff --git a/tests/admin_scripts/management/commands/validation_command.py b/tests/admin_scripts/management/commands/validation_command.py
index e9ba86dc6c..d0cbe19a81 100644
--- a/tests/admin_scripts/management/commands/validation_command.py
+++ b/tests/admin_scripts/management/commands/validation_command.py
@@ -1,11 +1,11 @@
-from django.core.management.base import NoArgsCommand
+from django.core.management.base import BaseCommand
-class InvalidCommand(NoArgsCommand):
+class InvalidCommand(BaseCommand):
help = ("Test raising an error if both requires_system_checks "
"and requires_model_validation are defined.")
requires_system_checks = True
requires_model_validation = True
- def handle_noargs(self, **options):
+ def handle(self, **options):
pass