#NEWLINE# def test_names( self ) : #NEWLINE# #INDENT# bot = self . callFTU ( ) #NEWLINE# assert ( len ( bot . registry . events_re [ 'in' ] ) == 0 ) #NEWLINE# task = bot . async_cmds . names ( '#irc3' ) #NEWLINE# assert ( len ( bot . registry . events_re [ 'in' ] ) == 2 ) #NEWLINE# bot . dispatch ( ':card.freenode.net 353 nick @ #irc3 :irc3 @gawel' ) #NEWLINE# bot . dispatch ( ':card.freenode.net 353 nick @ #irc3 :+panoramisk' ) #NEWLINE# bot . dispatch ( ':card.freenode.net 366 nick #irc3 :End of /NAMES list.' ) #NEWLINE# bot . loop . run_until_complete ( bot ) #NEWLINE# result = task . result ( ) #NEWLINE# assert ( result [ 'timeout' ] is False ) #NEWLINE# assert ( len ( result [ 'names' ] ) == 3 )