summaryrefslogtreecommitdiff
path: root/openstackclient/tests/common/test_extension.py
Commit message (Collapse)AuthorAgeFilesLines
* Standardize import formatshizhihui2016-07-221-3/+2
| | | | | | | | According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format. Change-Id: Ibf29ccaf3ddec4a956334cc3368ebee7a66e282c
* Update unit test test_extension with fake classHuanxuan Ao2016-06-071-81/+75
| | | | | | | Add FakeExtension class in networkv2, computev2, volumev2, identityv2_0 and update unit test test/common/test_extension.py Change-Id: I94815de7801860edb7fa91a7d146455cab946652
* Enhance list extension unit testFang Zhen2016-03-111-40/+117
| | | | | | | | Extension list involves identity, compute, volume and network. Current test covers only identity and network. This patch added test against compute and volum. Also refactored current implentation. Change-Id: If9b36cba24c50a817a17f685801e418fb898596a
* Fix DisplayCommandBase comments for cliff Lister subclass testsTang Chen2016-02-091-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 2 in all but identity tests. There are too many such comments in identity tests. So fix them all in another patch. Change-Id: I00f38d12f55abe20fa708f6349073da658622f8d Partial-bug: #1477199
* Changed the abstract columns and datalists from test cases of common and ↵SaiKiran2016-01-121-6/+5
| | | | | | | | | | | Identity columns and datalist has been set in each test case in compute, which is not necessary. This patch abstract it out and remove all redundant code. Change-Id: I45a3582088161f12e60e7c933da8e7dcc0ae8e7b Closes-Bug: #1532384
* SDK integration extensions and server create networksTerry Howe2015-12-091-3/+3
| | | | | | | Finish up the SDK integration with server create network and port find and extension list. Change-Id: I18dbada784d8aa92a45a937f251023ddf899c53e
* Remove unnecessary test extension mockTerryHowe2015-07-171-7/+0
| | | | | | The network extension test does not need this. Change-Id: I8dd2cad759a813d7df0476afa6c56f455ddff616
* fix the wrong order of assertEqual argswanghong2015-01-271-8/+8
| | | | | | Let's fix them thoroughly. Change-Id: I8a1f042fb614b05c9836a49041f3883638b870b0
* Add network extension listTerry Howe2014-07-261-2/+50
| | | | | | | Network extension list support Change-Id: I013f68ef2c3329c8db59e2441dd8d4ffafd4470e Closes-Bug: #1337685
* Add support for extension listMatt Fischer2014-06-111-0/+128
- Add support in the common section for extension list. This only supports Identity for now. Once the APIs for volume and compute are supported in the respective APIs, they will be added. Once network is added to this client, it will be added (the API already supports it). - Include extension fakes for volume and compute for pre-enablement. Change-Id: Iebb0156a779887d2ab06488a2a27b70b56369376 Closes-Bug: #1319115