#NEWLINE# @ patch ( '__builtin__.open' ) #NEWLINE# @ patch ( 'os.path.exists' ) #NEWLINE# @ patch ( 'os.makedirs' ) #NEWLINE# def test_add_creates_dir( self , mock_makedirs , mock_exists , mock_open ) : #NEWLINE# #INDENT# mock_exists . return_value = False #NEWLINE# self . setup . write ( ) #NEWLINE# assert mock_open . called #NEWLINE# assert mock_exists . called #NEWLINE# assert mock_makedirs . called