commit eb1574281b84e86ee4c4b65d900e1de82c24471e
Author: Tang Chen <email address hidden>
Date: Sat Mar 5 17:12:42 2016 +0800
Test take_action() instead of run() in unit tests
Some of the unit tests test run(), but not take_action().
For example, in openstackclient/tests/volume/v1/test_volume.py, there is:
def test_volume_set_size_smaller(self):
......
result = self.cmd.run(parsed_args)
self.assertEqual(0, result)
......
run() is defined in class Command in cliff. We don't need to test it in OSC
unit tests. On the contrary, we should test take_action(), which is
overwritten in each command classes in OSC.
Reviewed: https:/ /review. openstack. org/288861 /git.openstack. org/cgit/ openstack/ python- openstackclient /commit/ ?id=eb1574281b8 4e86ee4c4b65d90 0e1de82c24471e
Committed: https:/
Submitter: Jenkins
Branch: master
commit eb1574281b84e86 ee4c4b65d900e1d e82c24471e
Author: Tang Chen <email address hidden>
Date: Sat Mar 5 17:12:42 2016 +0800
Test take_action() instead of run() in unit tests
Some of the unit tests test run(), but not take_action().
For example, in openstackclient /tests/ volume/ v1/test_ volume. py, there is:
def test_volume_ set_size_ smaller( self):
......
result = self.cmd. run(parsed_ args)
......
run() is defined in class Command in cliff. We don't need to test it in OSC
unit tests. On the contrary, we should test take_action(), which is
overwritten in each command classes in OSC.
Change-Id: If07e89953d40ac 530f08cbb1ec05f 5805171364b
Closes-bug: #1553468