keystoneauth1.fixture.keystoneauth_betamax module

keystoneauth1.fixture.keystoneauth_betamax module

A fixture to wrap the session constructor for use with Betamax.

class keystoneauth1.fixture.keystoneauth_betamax.BetamaxFixture(cassette_name, cassette_library_dir=None, serializer=None, record=False, pre_record_hook=<function pre_record_hook>, serializer_name=None, request_matchers=None)

Bases: fixtures.fixture.Fixture

property serializer_name

Determine the name of the selected serializer.

If a class was specified, use the name attribute to generate this, otherwise, use the serializer_name parameter from __init__.

Returns

Name of the serializer

Return type

str

setUp()

Prepare the Fixture for use.

This should not be overridden. Concrete fixtures should implement _setUp. Overriding of setUp is still supported, just not recommended.

After setUp has completed, the fixture will have one or more attributes which can be used (these depend totally on the concrete subclass).

Raises

MultipleExceptions if _setUp fails. The last exception captured within the MultipleExceptions will be a SetupError exception.

Returns

None.

Changed in 1.3

The recommendation to override setUp has been reversed - before 1.3, setUp() should be overridden, now it should not be.

Changed in 1.3.1

BaseException is now caught, and only subclasses of Exception are wrapped in MultipleExceptions.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.