fixture Package

fixture Package

The generators in this directory produce keystone compliant tokens for use in testing.

They should be considered part of the public API because they may be relied upon to generate test tokens for other clients. However they should never be imported into the main client (keystoneclient or other). Because of this there may be dependencies from this module on libraries that are only available in testing.

keystoneclient.fixture.V2Token

alias of Token

exception keystoneclient.fixture.FixtureValidationError

Bases: exceptions.Exception

The token you created is not legitimate.

The data contained in the token that was generated is not valid and would not have been returned from a keystone server. You should not do testing with this token.

exception Module

exception keystoneclient.fixture.exception.FixtureValidationError

Bases: exceptions.Exception

The token you created is not legitimate.

The data contained in the token that was generated is not valid and would not have been returned from a keystone server. You should not do testing with this token.

v2 Module

class keystoneclient.fixture.v2.Token(token_id=None, expires=None, tenant_id=None, tenant_name=None, user_id=None, user_name=None)

Bases: dict

A V2 Keystone token that can be used for testing.

This object is designed to allow clients to generate a correct V2 token for use in there test code. It should prevent clients from having to know the correct token format and allow them to test the portions of token handling that matter to them and not copy and paste sample.

add_role(name=None, id=None)
add_service(type, name=None)
expires
expires_str
root
set_scope(id=None, name=None)
tenant_id
tenant_name
token_id
user_id
user_name
validate()

Table Of Contents

Previous topic

ec2 Package

Next topic

generic Package

This Page