The ironic.tests.base Module¶
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.FixtureReplace a module with a fake module.
-
class
ironic.tests.base.TestCase(*args, **kwargs)[source]¶ Bases:
testtools.testcase.TestCaseTest case base class for all unit tests.
-
assertJsonEqual(expected, observed)[source]¶ Asserts that 2 complex data structures are json equivalent.
-
assertNotificationEqual(notif_args, service, host, event_type, level)[source]¶ Asserts properties of arguments passed when creating a notification.
Parameters: - notif_args – dict of arguments notification instantiated with
- service – expected service that emits the notification
- host – expected host that emits the notification
- event_type – expected value of EventType field of notification as a string
- level – expected NotificationLevel
-