diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2009-11-18 13:22:48 +0300 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2009-11-18 13:22:48 +0300 |
commit | 1b22a33239e99592b4e2b27df68315605d28dbc4 (patch) | |
tree | f3acfecb858b3bba4145dc30190de9d34138921d | |
parent | 4671f62d2fd7d54e9501ff5307a07847e976772d (diff) |
add a HTML message parsser test
-rw-r--r-- | test/integration/test_xmpp_transports_nb.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/integration/test_xmpp_transports_nb.py b/test/integration/test_xmpp_transports_nb.py index 6e56ddf94..ef9908903 100644 --- a/test/integration/test_xmpp_transports_nb.py +++ b/test/integration/test_xmpp_transports_nb.py @@ -254,12 +254,12 @@ class TestNonBlockingHTTP(AbstractTransportTest): def test_receive_http_message_in_chunks(self): ''' Let _on_receive handle some chunked http messages ''' transport = self._get_transport(self.bosh_http_dict) - - header = ("HTTP/1.1 200 OK\r\nContent-Type: text/xml; charset=utf-8\r\n" + - "Content-Length: 88\r\n\r\n") - payload = "<test>Please don't fail!</test>" + + payload = "<test>Please don't fail!\n\n</test>" body = "<body xmlns='http://jabber.org/protocol/httpbind'>%s</body>" \ % payload + header = "HTTP/1.1 200 OK\r\nContent-Type: text/xml; charset=utf-8\r\n" +\ + "Content-Length: %i\r\n\r\n" % len(body) message = "%s%s" % (header, body) chunk1, chunk2, chunk3, chunk4 = message[:20], message[20:73], \ |