#NEWLINE# def test_status( self ) : #NEWLINE# #INDENT# '\n        Change status\n        ' #NEWLINE# def joined( _ ) : #NEWLINE# #INDENT# d = self . protocol . status ( self . roomJID , 'xa' , 'testing MUC' ) #NEWLINE# d . addCallback ( statusChanged ) #NEWLINE# return d #NEWLINE# #UNINDENT# def statusChanged( room ) : #NEWLINE# #INDENT# self . assertEqual ( self . roomJID , room . roomJID ) #NEWLINE# user = room . getUser ( self . nick ) #NEWLINE# self . assertNotIdentical ( None , user , 'User not found' ) #NEWLINE# self . assertEqual ( 'testing MUC' , user . status , 'Wrong status' ) #NEWLINE# self . assertEqual ( 'xa' , user . show , 'Wrong show' ) #NEWLINE# #UNINDENT# d = self . protocol . join ( self . roomJID , self . nick ) #NEWLINE# d . addCallback ( joined ) #NEWLINE# xml = ( "\n            <presence to='%s' from='%s'/>\n        " % ( self . userJID , self . occupantJID ) ) #NEWLINE# self . stub . send ( parseXml ( xml ) ) #NEWLINE# xml = ( "\n            <presence from='%s'>\n              <x xmlns='http://jabber.org/protocol/muc#user'>\n                <item affiliation='member' role='participant'/>\n              </x>\n              <show>xa</show>\n              <status>testing MUC</status>\n            </presence>\n        " % self . occupantJID ) #NEWLINE# self . stub . send ( parseXml ( xml ) ) #NEWLINE# return d