8 Commits

Author SHA1 Message Date
Tang Chen
ada06f4dc3 Add MultiKeyValueAction to custom parser action
Class MultiKeyValueAction will be used to parse arguments like this:

--route destination=xxx,gateway=xxx --route destination=yyy,gateway=yyy

The result is a list like this:

[{destination:xxx, gateway:xxx}, {destination:yyy, gateway:yyy}]

This action also contain validation of the parameters.

Change-Id: Ie3aa8635c6a13fc2e429fe6922acd681dc7244cf
2016-02-27 03:53:32 +08:00
Tang Chen
8d718e9d67 Refactor: Initialize parser in setUp() in TestNonNegativeAction
Change-Id: I12846acc4450d31d19897bbdfc6846bde8c8f2ce
2015-12-28 20:01:13 +08:00
Tang Chen
f0a3b175a1 Refactor: Initialize parser in setUp() in TestKeyValueAction
No need to initialize parser in each test case. Do it in setUp().
Also remove the test_default_values case because it could be tested
in the test_good_values case.

Change-Id: Ia2ed7c9e46bf6baabbd62b9d50511c5e8103e5e2
2015-12-28 17:28:04 +08:00
Xi Yang
8210ba7a55 Replace assertEqual(None, *) with assertIsNone(*)
This patch is going to replace assertEqual(None, *) with
assertIsNone(*) in unit test code to have more clear messages
in case of failure.

Change-Id: I6f85498347e8fc7cad5ea7afb832b9acda7daafc
2015-12-25 13:14:33 +08:00
xiexs
ea63553925 Fix the bug of "openstack console log show"
The behaviors are inconsistent while different
negative line numbers specified.

Change-Id: I2573f3e789f5603c896758971830ffc0b94c5e2b
Closes-Bug: #1512263
2015-11-09 04:22:09 -05:00
wanghong
127af151ff fix the wrong order of assertEqual args
Let's fix them thoroughly.

Change-Id: I8a1f042fb614b05c9836a49041f3883638b870b0
2015-01-27 17:02:41 +08:00
Alex Gaynor
a8087a6c8b Fixed several typos throughout the codebase
Change-Id: I048ee857fc1215fea7f60978364894e1b5abdf66
2014-05-21 07:47:52 -07:00
Monty Taylor
196daf859b Move tests into project package.
There are several reasons for this. One is that the majority of
OpenStack packages behave this way. The second is that it makes writing
software that extends something easier to test (which is a clear usecase
for openstackclient) And third, tests/__init__.py implies a global
package named "tests" - which I'm pretty sure we're not providing.

Change-Id: Ic708ffd92aea78c2ffc1a8579af0587af4fca4ff
2013-06-30 23:30:54 -04:00