The ironic.tests.matchers Module

Matcher classes to be used inside of the testtools assertThat framework.

class ironic.tests.matchers.DictKeysMismatch(d1only, d2only)[source]

Bases: object

describe()[source]
get_details()[source]
class ironic.tests.matchers.DictMatches(d1, approx_equal=False, tolerance=0.001)[source]

Bases: object

match(d2)[source]

Assert two dicts are equivalent.

This is a ‘deep’ match in the sense that it handles nested dictionaries appropriately.

NOTE:

If you don’t care (or don’t know) a given value, you can specify the string DONTCARE as the value. This will cause that dict-item to be skipped.
class ironic.tests.matchers.DictMismatch(key, d1_value, d2_value)[source]

Bases: object

describe()[source]
get_details()[source]

This Page