summaryrefslogtreecommitdiff
path: root/openstackclient/tests/identity/v3/test_token.py
Commit message (Collapse)AuthorAgeFilesLines
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-081-138/+0
| | | | | | | | this will better isolate the unit tests from the functional tests. unfortunately, the "integration" tests had to be lumped into the "unit" tests since we need the separation in testr.conf Change-Id: Ifd12198c1f90e4e3c951c73bfa1884ab300d8ded
* format token expires time to prevent json loading datetime dataSteve Martinelli2016-09-051-3/+3
| | | | | | | | | | | | When output to shell, the token issue time is fine; however when selecting the json formatter (via the --format json) option, an exception is raised when formatting the dataetime data. Rather than pass in the datetime data, we should format the data with the ISO 8601 formatting. Closes-Bug: 1619937 Change-Id: Iffebb2d5413fabfd283dfa94fc560fc37270f9dd
* Moving authentication from keystoneclient to keystoneauthNavid Pustchi2016-06-091-20/+29
| | | | | | | | | | | | | | | | | Currently OpenStackClient uses keystoneclient for authentication. This change will update OpenStackClient to use keystoneauth for authentication. All dependant test have been updated. Updating how auth_ref is set in the tests to use KSA fixtures had some racy side-effects. The user_role_list tests failed when they picked up an auth_ref that was a fixture. This exposed a weakness in ListUserRole that needed to be fixed at the same time re handling of unscoped tokens and options. Change-Id: I4ddb2dbbb3bf2ab37494468eaf65cef9213a6e00 Closes-Bug: 1533369
* [Identity] Check return value is None in identity v3 unit testsTang Chen2016-03-081-1/+2
| | | | | | | | | take_action() in commands inheriting from Command returns nothing. So we should assert the return is None in the unit tests of these commands. Change-Id: I02af06b3d476aac2d93a23ef2111cdc7fa0892ec Partial-Bug: #1550636
* Support unscoped token requestguang-yee2016-02-191-0/+21
| | | | | | | | Make scope check optional for the "token issue" command as unscoped token is a valid Keystone V2/V3 API. Change-Id: Ie1cded4dbfdafd3a78c0ebdf89e3f66762509930 Closes-Bug: #1543214
* Merge "Add "token revoke" for identity v3"Jenkins2016-02-171-0/+21
|\
| * Add "token revoke" for identity v3lin-hua-cheng2016-02-091-0/+21
| | | | | | | | | | Change-Id: Ie631600d02942fe6ce035f31af46abe44e543631 Closes-bug: #1543226
* | Identity: Fix DisplayCommandBase comments for cliff ShowOne subclass testsTang Chen2016-02-101-2/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 all identity tests. Change-Id: I1f05e833cdacd30915954e4220b6e1f16ac1ed40 Closes-bug: #1477199
* fix the wrong order of assertEqual argswanghong2015-01-271-4/+4
| | | | | | Let's fix them thoroughly. Change-Id: I8a1f042fb614b05c9836a49041f3883638b870b0
* Fix token issue after auth changeupDean Troyer2014-10-201-4/+6
| | | | | | | | | | | IssueToken.take_action() was missed in updating the structure of the ClientManager. Also, TOKEN_WITH_TENANT_ID in v3 is just wrong... Closes-Bug: #1383396 Change-Id: If2dd82a26af1d743ee9df73e0c1aebce497bf22e
* Fix issue token for v3Steve Martinelli2014-10-111-1/+2
| | | | | | | | Currently the code is broken as it references a part of keystoneclient that does not exist. Change-Id: I7fbc754537fbb4acffb166b5854840acfaef1fb8 Closes-Bug: #1379871
* Rename token classes to match commandDean Troyer2014-06-271-5/+5
| | | | | | | The token create/delete commands were renamed but not the class names. Rename them to match. Change-Id: Icbf9c0a954ed0332fa4c99e4ee2612bb11f89e3a
* Add token create subcommand for identity v3 apiQiu Yu2014-01-291-0/+79
Implements token create subcommand which is an equivalent of keystone token-get command. Original "wrap" parameter for keystone token-get is not implemented yet due to cliff Bug #1269299 This is a part of: blueprint add-identity-token-support Change-Id: I2255021c9d1f10f757686583b1ebe40b5f3a9ecb