Allow assertXmlEqual() to pass options to matchers.XMLMatches
matchers.XMLMatches supports three options: - allow_mixed_nodes - skip_empty_text_nodes - skip_values However these are not accessible when using the matcher via assertXmlEqual(). So extend the latter with an *options dictionary to allow options to be passed through. This will be used by another commit in the SEV series in the near future which needs the allow_mixed_nodes option to be enabled to compare XML fragments with elements in different orders. blueprint: amd-sev-libvirt-support Change-Id: I31c60771891c3a2eb06fbc780ba2d369465498ec
This commit is contained in:
parent
872a823d9a
commit
1e05b9e61c
|
@ -586,8 +586,8 @@ class TestCase(testtools.TestCase):
|
|||
error.difference = difference
|
||||
raise error
|
||||
|
||||
def assertXmlEqual(self, expected, observed):
|
||||
self.assertThat(observed, matchers.XMLMatches(expected))
|
||||
def assertXmlEqual(self, expected, observed, **options):
|
||||
self.assertThat(observed, matchers.XMLMatches(expected, **options))
|
||||
|
||||
def assertPublicAPISignatures(self, baseinst, inst):
|
||||
def get_public_apis(inst):
|
||||
|
|
Loading…
Reference in New Issue