Failed Unittest: test_xmpp_transports_nb.py
======================================================================
ERROR: Let _on_receive handle some http messages
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_xmpp_transports_nb.py", line 318, in test_receive_http_message
transport._on_receive(chunk)
File "/home/stephan/projekte/python/gajim/trunk/src/common/xmpp/transports_nb.py", line 633, in _on_receive
if statusline[1] != '200':
IndexError: list index out of range
BOSH code assumes to always receive complete messages. It will crash, like the testcase is showing, if a message is received in two chunks. This might be due to big messages (vcards) or simply because of network congestion.
======================================================================
FAIL: test_get_proxy_data_from_dict (__main__.TestModuleLevelFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_xmpp_transports_nb.py", line 52, in test_get_proxy_data_from_dict
passwd=u'pass')
File "test_xmpp_transports_nb.py", line 32, in check_dict
self.assertEqual(_host, host)
AssertionError: u'gajim.org:5280' != u'gajim.org'
This bug is more a reminder than a real issue. Bosh URL and port should not be entered separately, because user cannot rely on simple copy and paste.
======================================================================
FAIL: Build a HTTP message and try to parse it afterwards
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_xmpp_transports_nb.py", line 293, in test_parse_own_http_message
self.assertEqual(data, http_body, msg='Input and output are different')
AssertionError: Input and output are different
When wrapping a body around a custom message and striping it afterwards, the mesagge is altered. A linebreak is added at the end of the message.