Commit ee45ce4a authored by Philipp Hörist's avatar Philipp Hörist

Fix test

parent 622a4566
Pipeline #3035 passed with stages
in 18 seconds
......@@ -88,7 +88,8 @@ class TestDispatcherNB(unittest.TestCase):
self._simulate_connect()
stanza = "<iq type='get' />"
def send(data):
self.assertEqual(lib.xml2str_sorted(data), '<iq xmlns="jabber:client" type="error"><error code="501" type="cancel"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">The feature requested is not implemented by the recipient or server and therefore cannot be processed.</text></error></iq>')
print(lib.xml2str_sorted(data))
self.assertEqual(lib.xml2str_sorted(data), '<iq xmlns="jabber:client" from="test@test.test" to="test@test.test" type="error"><error code="501" type="cancel"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">The feature requested is not implemented by the recipient or server and therefore cannot be processed.</text></error></iq>')
self.client.send = send
self.dispatcher.ProcessNonBlocking(stanza)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment