<s> import unittest <EOL> from biicode . common . model . resource import Resource <EOL> from nose . plugins . attrib import attr <EOL> from biicode . common . model . symbolic . reference import References <EOL> @ attr ( '<STR_LIT>' ) <EOL> class RemoteTest ( unittest . TestCase ) : <EOL> def assert_published_resources ( self , api_manager , version , files ) : <EOL> """<STR_LIT>""" <EOL> cellnames = { blockcellname . cell_name : content <EOL> for blockcellname , content in files . iteritems ( ) } <EOL> refs = References ( ) <EOL> refs [ version ] = set ( cellnames . keys ( ) ) <EOL> referenced_resources = api_manager . get_published_resources ( refs ) <EOL> for thefile , thecontent in cellnames . iteritems ( ) : <EOL> resource = referenced_resources [ version ] [ thefile ] <EOL> self . assertIsInstance ( resource , Resource ) <EOL> self . assertEqual ( resource . content . load . text , thecontent ) </s>
