Changeset 37:fdc4860de17d


Ignore:
Timestamp:
Oct 11, 2008, 9:33:12 PM (14 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Convert:
svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@103
Message:

Fix test for presence of stanzaType in toResponse.

Author: caedes, ralphm.
Fixes #34.

Location:
wokkel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wokkel/compat.py

    r34 r37  
    3535    if stanzaID:
    3636        response['id'] = stanzaID
    37     if type:
     37    if stanzaType:
    3838        response['type'] = stanzaType
    3939
  • wokkel/test/test_compat.py

    r34 r37  
    124124        response = toResponse(stanza)
    125125        self.failIf(response.hasAttribute('id'))
     126
     127
     128    def test_noType(self):
     129        """
     130        Test that a proper response is generated without type attribute.
     131        """
     132        stanza = domish.Element(('jabber:client', 'message'))
     133        response = toResponse(stanza)
     134        self.failIf(response.hasAttribute('type'))
Note: See TracChangeset for help on using the changeset viewer.