#NEWLINE# def test_joinLocked( self ) : #NEWLINE# #INDENT# '\n        A new room is locked by default.\n        ' #NEWLINE# def cb( room ) : #NEWLINE# #INDENT# self . assertTrue ( room . locked , 'Room is not marked as locked' ) #NEWLINE# #UNINDENT# d = self . protocol . join ( self . roomJID , self . nick ) #NEWLINE# d . addCallback ( cb ) #NEWLINE# xml = ( '\n            <presence from=\'%s@%s/%s\'>\n              <x xmlns=\'http://jabber.org/protocol/muc#user\'>\n                <item affiliation=\'owner\' role=\'moderator\'/>\n                <status code="110"/>\n                <status code="201"/>\n              </x>\n            </presence>\n        ' % ( self . roomIdentifier , self . service , self . nick ) ) #NEWLINE# self . stub . send ( parseXml ( xml ) ) #NEWLINE# return d