this works, an alternative is stick the XML in https://github.com/mozilla/solitude/blob/master/lib/boku/tests/sample_xml.py and then mock like this: https://github.com/mozilla/solitude/blob/master/lib/provider/tests/test_boku.py#L37, the client will parse the XML into a BokuException for you I believe.