def test_upload_transactions(self): if not self.target_portfolios_exist(): self.skipTest("missing target portfolios") # Load JLH1 Transactions from first sheet from example Excel file up.process_args( self.api, up.parse(args=[ "JLH", "JLH1", "-t", f"{self.test_data_path.joinpath('examples').joinpath('transactions-examples.xlsx')}", ]), ).match( lambda left: self.fail(lpt.display_error(left)), lambda right: self.assertEqual(right, "Done!"), )
def test_upload_multiple_transaction(self): if not self.target_portfolios_exist(): self.skipTest("missing target portfolios") # Load JLH2 and JLH3 Transactions from second sheet from example Excel file up.process_args( self.api, up.parse(args=[ "JLH", "col:portfolio-code", # col: prefix indicates code is in the sheet "-t", f"{self.test_data_path.joinpath('examples').joinpath('transactions-examples.xlsx:Multiple')}", ]), ).match( lambda left: self.fail(lpt.display_error(left)), lambda right: self.assertEqual(right, "Done!"), )
def test_upload_holding(self): if not self.target_portfolios_exist(): self.skipTest("missing target portfolios") up.process_args( self.api, up.parse(args=[ "JLH", "JLH1", "-p", f"{self.test_data_path.joinpath('examples').joinpath('holdings-examples.xlsx')}", "2019-01-01", ]), ).match( lambda left: self.fail(lpt.display_error(left)), lambda right: self.assertEqual(right, "Done!"), )