#NEWLINE# @ mock . patch ( 'fbpush.main.open' , create = True ) #NEWLINE# @ mock . patch ( 'fbpush.main.sorted' , create = True ) #NEWLINE# def test_is_dry_run_prev( self , mock_sorted , mock_open ) : #NEWLINE# #INDENT# dry_run_bool = main . is_dry_run_prev ( 'test_configlet' ) #NEWLINE# mock_open . assert_called_with ( config . DRY_RUN_HASH_FILENAME , 'r' ) #NEWLINE# self . assertEqual ( self . call_count , 1 ) #NEWLINE# self . assertEqual ( dry_run_bool , False ) #NEWLINE# err = ImportError ( 'abc' ) #NEWLINE# mock_sorted . side_effect = err #NEWLINE# dry_run_bool = main . is_dry_run_prev ( 'test_configlet' ) #NEWLINE# self . assertEqual ( dry_run_bool , False )