summaryrefslogtreecommitdiff
path: root/openstackclient/tests/common/test_parseractions.py
Commit message (Collapse)AuthorAgeFilesLines
* Use assertItemsEqual() instead of assertListEqual()Tang Chen2016-03-141-10/+2
| | | | | | | | assertListEqual() is order sensitive. So we need to sort the lists before we compare them. Use assertItemsEqual() instead is better. Change-Id: I9eaa98716c7401f5b099b007438acc916dae619b
* Add MultiKeyValueAction to custom parser actionTang Chen2016-02-271-0/+129
| | | | | | | | | | | | | | 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
* Refactor: Initialize parser in setUp() in TestNonNegativeActionTang Chen2015-12-281-26/+10
| | | | Change-Id: I12846acc4450d31d19897bbdfc6846bde8c8f2ce
* Refactor: Initialize parser in setUp() in TestKeyValueActionTang Chen2015-12-281-52/+9
| | | | | | | | 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
* Replace assertEqual(None, *) with assertIsNone(*)Xi Yang2015-12-251-1/+1
| | | | | | | | 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
* Fix the bug of "openstack console log show"xiexs2015-11-091-0/+55
| | | | | | | | The behaviors are inconsistent while different negative line numbers specified. Change-Id: I2573f3e789f5603c896758971830ffc0b94c5e2b Closes-Bug: #1512263
* fix the wrong order of assertEqual argswanghong2015-01-271-1/+1
| | | | | | Let's fix them thoroughly. Change-Id: I8a1f042fb614b05c9836a49041f3883638b870b0
* Fixed several typos throughout the codebaseAlex Gaynor2014-05-211-1/+1
| | | | Change-Id: I048ee857fc1215fea7f60978364894e1b5abdf66
* Move tests into project package.Monty Taylor2013-06-301-0/+104
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