#NEWLINE# @ patch ( 'sys.stdout' , new_callable = StringIO ) #NEWLINE# def test_do_archive_list_debug( self , out ) : #NEWLINE# #INDENT# from lacore.adf.elements import Archive , Meta #NEWLINE# meta = Meta ( format = '' , size = None , cipher = '' ) #NEWLINE# archive = Archive ( title = 'foo' , description = '' , tags = [ ] , meta = meta ) #NEWLINE# registry = Mock ( ) #NEWLINE# registry . cache . _for_adf . return_value = { #NEWLINE# #INDENT# 'foo' : { #NEWLINE# #INDENT# 'archive' : registry , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# registry . prefs = self . prefs #NEWLINE# registry . prefs [ 'command' ] [ 'debug' ] = 3 #NEWLINE# cli = self . _makeit ( registry ) #NEWLINE# cli . onecmd ( 'list' ) #NEWLINE# self . assertThat ( out . getvalue ( ) , Contains ( '!archive' ) )