#NEWLINE# def test_extract( self ) : #NEWLINE# #INDENT# template_catalog = self . pod . catalogs . extract ( ) #NEWLINE# self . assertEqual ( 20 , len ( template_catalog ) ) #NEWLINE# expected = [ 'Hello World!' , 'Hello World 2!' , 'Tagged String' , 'Tagged String in List 1' , 'Tagged String in List 2' ] #NEWLINE# for string in expected : #NEWLINE# #INDENT# self . assertIn ( string , template_catalog ) #NEWLINE# #UNINDENT# self . assertNotIn ( 'foo' , template_catalog ) #NEWLINE# template_catalog . add ( 'foo' , 'bar' ) #NEWLINE# self . pod . catalogs . write_template ( self . pod . catalogs . template_path , template_catalog ) #NEWLINE# template_catalog = self . pod . catalogs . extract ( include_obsolete = True ) #NEWLINE# self . assertIn ( 'foo' , template_catalog ) #NEWLINE# template_catalog = self . pod . catalogs . extract ( include_obsolete = False ) #NEWLINE# self . assertNotIn ( 'foo' , template_catalog ) #NEWLINE# self . assertIn ( 'string content tagged' , template_catalog ) #NEWLINE# self . assertNotIn ( 'string content untagged' , template_catalog )