dimagi/commcare-hq — pull request #3812 by snopoke (2014-07-08 13:00:53+00:00)
Title: partial xml comparison

@dannyroberts @millerdev
Do you guys think this is useful?

Pros:
* don't have to have entire XML in repo

Cons:
* Can hide errors elsewhere in XML

Could also do the inverse - compare XML after deleting some nodes. Combination of both options could reudce amount of test XML required e.g.:
```python
self.assertXmlPartialEqual(expected_fixture, actual, './fixture')
self.assertXmlPartialEqual(expected_entry, actual, "./entry/command[@id='m1-f0']/..")
# removes sections matching xpath expressions before comparison
self.assertXmlReducedEqual(
expected_rest,
actual,
['./fixture', "./entry/command[@id='m1-f0']/.."],
negate=True
)
```