#NEWLINE# def it_can_construct_from_pkg_file( self , init , PhysPkgReader_ , from_xml , _srels_for , _load_serialized_parts ) : #NEWLINE# #INDENT# phys_reader = PhysPkgReader_ . return_value #NEWLINE# content_types = from_xml . return_value #NEWLINE# pkg_srels = _srels_for . return_value #NEWLINE# sparts = _load_serialized_parts . return_value #NEWLINE# pkg_file = Mock ( name = 'pkg_file' ) #NEWLINE# pkg_reader = PackageReader . from_file ( pkg_file ) #NEWLINE# PhysPkgReader_ . assert_called_once_with ( pkg_file ) #NEWLINE# from_xml . assert_called_once_with ( pkg_reader . content_types_xml ) #NEWLINE# _srels_for . assert_called_once_with ( phys_reader , '/' ) #NEWLINE# _load_serialized_parts . assert_called_once_with ( phys_reader , pkg_srels , content_types ) #NEWLINE# phys_reader . close . assert_called_once_with ( ) #NEWLINE# init . assert_called_once_with ( content_types , pkg_srels , sparts ) #NEWLINE# assert isinstance ( pkg_reader , PackageReader )