command: rename decorator style
We're moving from old CamelCase to snake_case for decorators to match
updated style guide, so rename the command decorator to match.
BUG=b:187789324
TEST=CQ passes
Change-Id: If8a0deb95307ceb04d616c6a7f2632dd3bd88b60
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3337920
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Sergey Frolov <sfrolov@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/cli/command_unittest.py b/cli/command_unittest.py
index 98890ca..5adea52 100644
--- a/cli/command_unittest.py
+++ b/cli/command_unittest.py
@@ -19,7 +19,7 @@
_COMMAND_NAME = 'superAwesomeCommandOfFunness'
-@command.CommandDecorator(_COMMAND_NAME)
+@command.command_decorator(_COMMAND_NAME)
class TestCommand(command.CliCommand):
"""A fake command."""
def Run(self):
@@ -45,14 +45,14 @@
"""Tests that our decorator correctly rejects bad test commands."""
try:
# pylint: disable=unused-variable
- @command.CommandDecorator('bad')
+ @command.command_decorator('bad')
class BadTestCommand(object):
"""A command that wasn't implemented correctly."""
except command.InvalidCommandError:
pass
else:
- self.fail('Invalid command was accepted by the CommandDecorator')
+ self.fail('Invalid command was accepted by @command_decorator')
def testAddDeviceArgument(self):
"""Tests CliCommand.AddDeviceArgument()."""