def test_transfer_converter_parse_send_file(self): test_transfer_converter = TransferConverter(test_send_file, transactions_folder=self.test_transaction_folder) is_mg_transfer = test_transfer_converter.parse() self.assertTrue(is_mg_transfer)
def test_end_to_end_transfer_converter_refund(self): self.test_end_to_end_transfer_converter_send() test_transfer_converter = TransferConverter(test_refund_file, transactions_folder=self.test_transaction_folder) test_transfer_converter.parse() test_transfer_converter.save_transfer_file() test_transfer_converter.insert_to_excel(daily_records_folder=testing_excel_destination_folder) test_transfer_converter.convert_to_pdf(is_to_print=False) test_transfer_converter.check_terror()
# -*- coding: windows-1255 -*- import sys import time import win32api from transfer_converter import TransferConverter if __name__ == '__main__': if len(sys.argv) > 1: file_name = sys.argv[1] else: raise ValueError('Please Provide file path') to_print = True if len(sys.argv) > 3: to_print = sys.argv[3] transfer_converter = TransferConverter( file_name, transactions_folder=ur'\\Back-change\c\TRANSACTIONS', is_to_print=to_print ) is_moneygram_file = transfer_converter.parse() if is_moneygram_file: transfer_converter.save_transfer_file() transfer_converter.insert_to_excel() transfer_converter.convert_to_pdf()