test_soap: use repr() to check error message (#38781)
This commit is contained in:
parent
438f253eda
commit
1812670c94
|
@ -52,8 +52,9 @@ def test_disable_strict_mode(mocked_post):
|
|||
|
||||
soap_resource = SOAPResource()
|
||||
client = SOAPClient(soap_resource)
|
||||
match = "Unexpected element %s, expected %s" % (repr(u'price'), repr(u'skipMe'))
|
||||
with pytest.raises(
|
||||
XMLParseError, match="Unexpected element u'price', expected u'skipMe'"):
|
||||
XMLParseError, match=match):
|
||||
client.service.GetLastTradePrice(tickerSymbol='banana')
|
||||
|
||||
client = SOAPClient(soap_resource, settings=Settings(strict=False))
|
||||
|
|
Loading…
Reference in New Issue