<s> import sys <EOL> from neutronclient . neutron . v2_0 . extension import ListExt <EOL> from neutronclient . neutron . v2_0 . extension import ShowExt <EOL> from neutronclient . tests . unit . test_cli20 import CLITestV20Base <EOL> from neutronclient . tests . unit . test_cli20 import MyApp <EOL> class CLITestV20Extension ( CLITestV20Base ) : <EOL> id_field = '<STR_LIT>' <EOL> def test_list_extensions ( self ) : <EOL> resources = '<STR_LIT>' <EOL> cmd = ListExt ( MyApp ( sys . stdout ) , None ) <EOL> contents = [ { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT:name>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' } , <EOL> { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT:name>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' } ] <EOL> ret = self . _test_list_resources ( resources , cmd , <EOL> response_contents = contents ) <EOL> ret_words = set ( ret . split ( ) ) <EOL> self . assertIn ( '<STR_LIT:name>' , ret_words ) <EOL> self . assertIn ( '<STR_LIT>' , ret_words ) <EOL> self . assertNotIn ( '<STR_LIT>' , ret_words ) <EOL> def test_show_extension ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = ShowExt ( MyApp ( sys . stdout ) , None ) <EOL> args = [ self . test_id ] <EOL> ext_alias = self . test_id <EOL> self . _test_show_resource ( resource , cmd , ext_alias , args , fields = [ ] ) </s>
