The nova.test Module

Base classes for our unit tests.

Allows overriding of flags for use of fakes, and some black magic for inline callbacks.

class APICoverage

Bases: object

cover_api = None
test_api_methods()
class Database(db_session, db_migrate, sql_connection, sqlite_db, sqlite_clean_db)

Bases: fixtures.fixture.Fixture

post_migrations()

Any addition steps that are needed outside of the migrations.

setUp()
class MoxStubout

Bases: fixtures.fixture.Fixture

Deal with code around mox and stubout as a fixture.

setUp()
class ReplaceModule(name, new_value)

Bases: fixtures.fixture.Fixture

Replace a module with a fake module.

setUp()
class ServiceFixture(name, host=None, **kwargs)

Bases: fixtures.fixture.Fixture

Run a service as a test fixture.

setUp()
class TestCase(*args, **kwargs)

Bases: testtools.testcase.TestCase

Test case base class for all unit tests.

flags(**kw)

Override flag variables for a test.

setUp()

Run before each test method to initialize test environment.

start_service(name, host=None, **kwargs)
exception TestingException

Bases: exceptions.Exception

class TimeOverride

Bases: fixtures.fixture.Fixture

Fixture to start and remove time override.

setUp()

Previous topic

The nova.storage.linuxscsi Module

Next topic

The nova.tests.api.ec2.test_cinder_cloud Module

This Page