#NEWLINE# def test_publish_local( self ) : #NEWLINE# #INDENT# for with_alias in [ True , False ] : #NEWLINE# #INDENT# targets = self . _prepare_for_publishing ( with_alias = with_alias ) #NEWLINE# with temporary_dir ( ) as publish_dir : #NEWLINE# #INDENT# self . set_options ( dryrun = False , local = publish_dir ) #NEWLINE# task = self . create_task ( self . context ( target_roots = targets ) ) #NEWLINE# self . _prepare_mocks ( task ) #NEWLINE# task . execute ( ) #NEWLINE# files = [ ] #NEWLINE# for ( _ , _ , filenames ) in safe_walk ( self . push_db_basedir ) : #NEWLINE# #INDENT# files . extend ( filenames ) #NEWLINE# #UNINDENT# self . assertEquals ( 0 , len ( files ) , 'Nothing should be written to the pushdb during a local publish' ) #NEWLINE# publishable_count = ( len ( targets ) - ( 1 if with_alias else 0 ) ) #NEWLINE# self . assertEquals ( publishable_count , task . confirm_push . call_count , 'Expected one call to confirm_push per artifact' ) #NEWLINE# self . assertEquals ( publishable_count , task . publish . call_count , 'Expected one call to publish per artifact' )