#NEWLINE# def testGetTopic( self ) : #NEWLINE# #INDENT# user = wFD ( self . _loggedInUser ( 'useruser' ) ) #NEWLINE# ( yield user ) #NEWLINE# user = user . getResult ( ) #NEWLINE# group = service . Group ( 'somechannel' ) #NEWLINE# group . meta [ 'topic' ] = 'This is a test topic.' #NEWLINE# group . meta [ 'topic_author' ] = 'some_fellow' #NEWLINE# group . meta [ 'topic_date' ] = 77777777 #NEWLINE# add = wFD ( self . realm . addGroup ( group ) ) #NEWLINE# ( yield add ) #NEWLINE# add . getResult ( ) #NEWLINE# user . transport . clear ( ) #NEWLINE# user . write ( 'JOIN #somechannel\r\n' ) #NEWLINE# response = self . _response ( user ) #NEWLINE# self . assertEquals ( response [ 3 ] [ 0 ] , 'realmname' ) #NEWLINE# self . assertEquals ( user [ 3 ] [ 1 ] , '332' ) #NEWLINE# self . assertEquals ( response [ 3 ] [ 2 ] , [ 'useruser' , '#somechannel' , 'This is a test topic.' ] ) #NEWLINE# self . assertEquals ( response [ 4 ] [ 1 ] , '333' ) #NEWLINE# self . assertEquals ( response [ 4 ] [ 2 ] , [ 'useruser' , '#somechannel' , 'some_fellow' , '77777777' ] ) #NEWLINE# user . transport . clear ( ) #NEWLINE# user . write ( 'TOPIC #somechannel\r\n' ) #NEWLINE# response = self . _response ( user ) #NEWLINE# self . assertEquals ( response [ 0 ] [ 1 ] , '332' ) #NEWLINE# self . assertEquals ( response [ 0 ] [ 2 ] , [ 'useruser' , '#somechannel' , 'This is a test topic.' ] ) #NEWLINE# self . assertEquals ( response [ 1 ] [ 1 ] , '333' ) #NEWLINE# self . assertEquals ( response [ 1 ] [ 2 ] , [ 'useruser' , '#somechannel' , 'some_fellow' , '77777777' ] )