#NEWLINE# def _test_tags_query( self , cmd , resources , args , query ) : #NEWLINE# #INDENT# self . mox . StubOutWithMock ( cmd , 'get_client' ) #NEWLINE# self . mox . StubOutWithMock ( self . client . httpclient , 'request' ) #NEWLINE# cmd . get_client ( ) . MultipleTimes ( ) . AndReturn ( self . client ) #NEWLINE# path = getattr ( self . client , ( resources + '_path' ) ) #NEWLINE# res = { #NEWLINE# #INDENT# resources : [ { #NEWLINE# #INDENT# 'id' : 'myid' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# resstr = self . client . serialize ( res ) #NEWLINE# self . client . httpclient . request ( test_cli20 . MyUrlComparator ( test_cli20 . end_url ( path , query , format = self . format ) , self . client ) , 'GET' , body = None , headers = mox . ContainsKeyValue ( 'X-Auth-Token' , test_cli20 . TOKEN ) ) . AndReturn ( ( test_cli20 . MyResp ( 200 ) , resstr ) ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# cmd_parser = cmd . get_parser ( 'list_networks' ) #NEWLINE# shell . run_command ( cmd , cmd_parser , cmd ) #NEWLINE# self . mox . VerifyAll ( ) #NEWLINE# self . mox . UnsetStubs ( ) #NEWLINE# _str = self . fake_stdout . make_string ( ) #NEWLINE# self . assertIn ( 'myid' , _str )