Changeset 75:389cfbf50ea0


Ignore:
Timestamp:
Nov 28, 2009, 2:47:22 PM (11 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
rebase_source:
e2d553cd9154b1ebe925f923d2327498690a20b0
Message:

Make sure ping handler marks incoming ping requests as handled.

Author: ralphm.
Fixes #66.

Location:
wokkel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wokkel/ping.py

    r65 r75  
    9595        response = toResponse(iq, 'result')
    9696        self.xmlstream.send(response)
     97        iq.handled = True
    9798
    9899
  • wokkel/test/test_ping.py

    r65 r75  
    134134
    135135
     136    def test_onPingHandled(self):
     137        """
     138        The ping handler should mark the stanza as handled.
     139        """
     140        xml = """<iq from='test@example.com' to='example.com' type='get'>
     141                   <ping xmlns='urn:xmpp:ping'/>
     142                 </iq>"""
     143        iq = parseXml(xml)
     144        self.stub.send(iq)
     145
     146        self.assertTrue(iq.handled)
     147
     148
    136149    def test_interfaceIDisco(self):
    137150        """
Note: See TracChangeset for help on using the changeset viewer.