#NEWLINE# def test_receivedGroupChat( self ) : #NEWLINE# #INDENT# "\n        Messages received from a room we're in are passed to receivedGroupChat.\n        " #NEWLINE# xml = ( "\n            <message to='test@test.com' from='%s' type='groupchat'>\n              <body>test</body>\n            </message>\n        " % self . occupantJID ) #NEWLINE# self . _createRoom ( ) #NEWLINE# def receivedGroupChat( room , user , message ) : #NEWLINE# #INDENT# self . assertEquals ( 'test' , message . body , 'Wrong group chat message' ) #NEWLINE# self . assertEquals ( self . roomJID , room . roomJID , 'Wrong room name' ) #NEWLINE# #UNINDENT# ( d , self . protocol . receivedGroupChat ) = calledAsync ( receivedGroupChat ) #NEWLINE# self . stub . send ( parseXml ( xml ) ) #NEWLINE# return d