Base classes for our unit tests.
Allows overriding of config for use of fakes, and some black magic for
inline callbacks.
- 
class ironic.tests.base.ReplaceModule(name, new_value)[source]
 
Bases: fixtures.fixture.Fixture
Replace a module with a fake module.
- 
setUp()[source]
 
- 
class ironic.tests.base.TestCase(*args, **kwargs)[source]
 
Bases: testtools.testcase.TestCase
Test case base class for all unit tests.
- 
assertJsonEqual(expected, observed)[source]
 
Asserts that 2 complex data structures are json equivalent.
- 
config(**kw)[source]
 
Override config options for a test.
- 
path_get(project_file=None)[source]
 
Get the absolute path to a file. Used for testing the API.
| Parameters: | project_file – File whose path to return. Default: None. | 
| Returns: | path to the specified file, or path to project root. | 
- 
setUp()[source]
 
Run before each test method to initialize test environment.
- 
set_defaults(**kw)[source]
 
Set default values of config options.
- 
exception ironic.tests.base.TestingException[source]
 
Bases: exceptions.Exception