summaryrefslogtreecommitdiff
path: root/openstackclient/tests/test_shell.py
diff options
context:
space:
mode:
authorTang Chen <chen.tang@easystack.cn>2016-02-06 10:47:56 +0800
committerTang Chen <chen.tang@easystack.cn>2016-02-06 10:47:56 +0800
commit23faa33b1b2914bbc3e103fca75fde70eb317021 (patch)
treecd9a2529941b9cc36bcaf05ae32e5fa12db08af7 /openstackclient/tests/test_shell.py
parent3c67e8dd6ed20f9a3d6c1f8f000214cc7a8f384e (diff)
downloadpython-openstackclient-23faa33b1b2914bbc3e103fca75fde70eb317021.tar.gz
Compute: Fix DisplayCommandBase comments for cliff ShowOne subclass tests
As bug #1477199 describes, the wrong comment below is all over the unit test code of OSC. # DisplayCommandBase.take_action() returns two tuples There is no such class named DisplayCommandBase in OSC. It is in cliff. All OSC command classes inherit from the base classes in cliff, class Command, class Lister and class ShowOne. It is like this: Object |--> Command |--> DisplayCommandBase |--> Lister |--> ShowOne take_action() is an abstract method of class Command, and generally is overwritten by subclasses. * Command.take_action() returns nothing. * Lister.take_action() returns a tuple which contains a tuple of columns and a generator used to generate the data. * ShowOne.take_action() returns an iterator which contains a tuple of columns and a tuple of data So, this problem should be fixed in 3 steps: 1. Remove all DisplayCommandBase comments for tests of classes inheriting from class Command in cliff as it returns nothing. 2. Fix all DisplayCommandBase comments for tests of classes inheriting from class Lister in cliff. Lister.take_action() returns a tuple and a generator. 3. Fix all DisplayCommandBase comments for tests of classes inheriting from class ShowOne in cliff. ShowOne.take_action() returns two tuples. This patch finishes step 3 in compute tests. Change-Id: I4df224ec82b5d82a3d6d3f366c0f68a7ea0d87cd Partial-bug: #1477199
Diffstat (limited to 'openstackclient/tests/test_shell.py')
0 files changed, 0 insertions, 0 deletions