From 225c387ba945ca53fd65c50b81e14be35337f256 Mon Sep 17 00:00:00 2001 From: schafsam Date: Sat, 10 Feb 2024 22:11:43 +0100 Subject: [PATCH 1/3] add pytest tests and remove tests.py --- test.py | 196 ----------------------------------------- tests/test_fund.py | 180 +++++++++++++++++++++++++++++++++++++ tests/test_search.py | 93 +++++++++++++++++++ tests/test_security.py | 7 ++ tests/test_stock.py | 93 +++++++++++++++++++ tests/test_utils.py | 5 ++ 6 files changed, 378 insertions(+), 196 deletions(-) delete mode 100644 test.py create mode 100644 tests/test_fund.py create mode 100644 tests/test_search.py create mode 100644 tests/test_security.py create mode 100644 tests/test_stock.py create mode 100644 tests/test_utils.py diff --git a/test.py b/test.py deleted file mode 100644 index 442dfd1..0000000 --- a/test.py +++ /dev/null @@ -1,196 +0,0 @@ -from mstarpy import Funds, search_field, Stock - -from mstarpy.security import Security -import datetime -import pandas as pd -from mstarpy.search import search_funds, search_filter,filter_universe, search_stock, token_investment_strategy, token_chart, token_fund_information -from mstarpy.utils import FILTER_FUND, FILTER_STOCK, EXCHANGE - - - -code = "FOUSA00LIX" -fund = Funds(code,country="us") -print(fund.name) - -print(fund.carbonMetrics()) -start_date = datetime.date(2018,1,1) -end_date = datetime.date.today() -history = fund.nav(start_date,end_date) -print(history) - -#print(Funds("myria").investmentLookup()) -# print(list(EXCHANGE)) -# #print(search_stock("a",field=["Name", "fundShareClassId", "GBRReturnM12", "PERatio"], exchange='HONG-KONG')) -# ms = Stock("MSFT", exchange="NASDAQ") - -# top_owner = ms.mutualFundConcentratedOwners(top = 100) -# df = pd.DataFrame(top_owner["rows"]) -# print(df) -# df.to_excel('test.xlsx', index = False) - -# filter_value = filter_universe(["starRating"]) -# print(filter_value) -#filters={"starRating" : (">", 2)} -# print(search_funds("myria",["Name","starRating"],filters={"starRating" : (">",2)})) - -#print(search_filter(asset_type="stock")) -#print(filter_universe(["SectorId", "debtEquityRatio"])) - - -# response = search_stock(term='',field=["Name", "fundShareClassId", "GBRReturnM12", "PERatio"], -# exchange='PARIS', filters={"PERatio" : ("<", '10'), "GBRReturnM12" : (">", 20), -# "debtEquityRatio" : (0, 5), "SectorId" : ["IG000BA008", "IG000BA006"] }) -# df = pd.DataFrame(response) - -# print(df.head()) - -#print(FILTER) -#print('AdministratorCompanyId' in FILTER) - -# start_date = datetime.datetime(2013,1,1) -# end_date = datetime.datetime.today() - -#print(filter_universe('IndustryId')) -#print(search_stock('FR0014003J32','LegalName',exchange="PARIS")) - -#print(search_stock('',['SecId','TenforeId','LegalName'], exchange="PARIS", pageSize=10,currency="EUR",filters={"GBRReturnM12":(0,20)})) - -# security = Security("visa",exchange='NYSE') -# print(security) -# print(security.name) -# code = security.code -# print(search_funds(code,["Universe", 'ExchangeId'])) -# print(security.asset_type) -# print(search_filter("CategoryId")) -# print(filter_universe("CategoryId")) - -# print(filter_universe(['StarRatingM2556', 'LargestRegion','SustainabilityRank' ],proxies=proxies)) - -# stock = Stock("360 DigiTech Inc") - -# print(stock.name) -# print(stock.asset_type) -# print(stock.isin) - -# print(stock.analysisData()) -# print(stock.analysisReport()) -# print(stock.balanceSheet('annual', 'original')) -# print(stock.boardOfDirectors()) -# print(stock.cashFlow('annual', 'restated')) -# print(stock.dividends()) -# print(stock.esgRisk()) -# print(stock.financialHealth()) -# print(stock.financialSummary('quarterly', 'original')) -# print(stock.freeCashFlow()) -# print(stock.incomeStatement('annual', 'original')) -# print(stock.institutionBuyers(top=5)) -# print(stock.institutionConcentratedOwners(top=10)) -# print(stock.institutionOwnership()) -# print(stock.institutionSellers(top=5)) -# print(stock.historical(start_date=start_date, end_date=end_date)) -# print(stock.keyExecutives()) -# print(stock.keyRatio()) -# print(stock.mutualFundBuyers(top=5)) -# print(stock.mutualFundConcentratedOwners(top=10)) -# print(stock.mutualFundOwnership()) -# print(stock.mutualFundSellers(top=5)) -# print(stock.operatingGrowth()) -#print(stock.operatingMargin()) -# print(stock.operatingPerformance()) -# print(stock.split()) -# print(stock.trailingTotalReturn()) -# print(stock.transactionHistory()) -# print(stock.transactionSummary()) -# print(stock.valuation()) - - - - - - - -# funds = Funds("LU1085283973") -# print(funds.code) -# print(funds.isin) -# print(funds.name) - -# print(funds.asset_type) -# print(funds.allocationMap()) -# print(funds.dataPoint("TenforeId")) -# print(funds.allocationWeighting()) -# print(funds.analystRating()) -# print(funds.analystRatingTopFunds()) -# print(funds.analystRatingTopFundsUpDown()) -# #print(funds.benchmark()) -# print(funds.carbonMetrics()) -# #print(funds.category()) -# #print(funds.categoryAnnualPerformance()) -# #print(funds.categoryCumulativePerformance()) -# #print(funds.contact()) -# print(funds.costIllustration()) -# print(funds.couponRange()) -# print(funds.creditQuality()) -# print(funds.dataPoint([ 'FeeLevel', -# 'fundshareClassId', -# 'fundsize', -# 'fundstyle',])) -# print(funds.distribution()) -# print(funds.equityStyle()) -# print(funds.equityStyleBoxHistory()) -# print(funds.esgData()) -# #print(funds.factorProfile()) -# print(funds.feeLevel()) -# #print(funds.fees()) -# print(funds.financialMetrics()) -# print(funds.fixedIncomeStyle()) -# print(funds.fixedincomeStyleBoxHistory()) -# #print(funds.fundsAnnualPerformance()) -# #print(funds.fundsAnnualRank()) -# #print(funds.fundsCumulativePerformance()) -# #print(funds.fundsQuarterlyPerformance()) -# print(funds.graphData()) -#print(funds.historicalData()) -# #print(funds.historicalExpenses()) -# print(funds.holdings()) -#print(funds.indexAnnualPerformance()) -#print(funds.indexCumulativePerformance()) -#print(funds.investmentStrategy()) -# print(funds.marketCapitalization()) -# print(funds.maturitySchedule()) -# print(funds.maxDrawDown()) -# print(funds.morningstarAnalyst()) -# print(funds.multiLevelFixedIncomeData()) -# df = pd.DataFrame(funds.nav(start_date = start_date, end_date=end_date)) -# print(df) -# #print(funds.objectiveInvestment()) -# print(funds.otherFee()) -# print(funds.ownershipZone()) -# print(funds.parentMstarRating()) -# print(funds.parentSummary()) -# print(funds.people()) -# print(funds.position()) -# print(funds.productInvolvement()) -# print(funds.proxyVotingManagement()) -# print(funds.proxyVotingShareHolder()) -# #print(funds.referenceIndex('category')) -# print(funds.regionalSector()) -# print(funds.regionalSectorIncludeCountries()) -# print(funds.riskReturnScatterplot()) -# print(funds.riskReturnSummary()) -# print(funds.riskVolatility()) -# print(funds.salesFees()) -# print(funds.sector()) -# print(funds.starRatingFundAsc()) -# print(funds.starRatingFundDesc()) -# print(funds.taxes()) -# print(funds.trailingReturn()) - - - - - - - - - - diff --git a/tests/test_fund.py b/tests/test_fund.py new file mode 100644 index 0000000..600e531 --- /dev/null +++ b/tests/test_fund.py @@ -0,0 +1,180 @@ +import datetime +import pytest +import time + +from mstarpy import Funds, search_field, Stock + +@pytest.fixture +def funds_collection(): + test_fund_details = [ + { + "isin": "GB00B784NS11", + "name": "AXA Framlington Biotech Fund GBP Z Acc", + "id": "F00000P77J", + "country": "gb", + "url": "https://www.morningstar.co.uk/uk/funds/snapshot/snapshot.aspx?id=F00000P77J" + }, + { + "isin": "LU1148874552", + "name": "New Millennium - Balanced World Conservative L", + "id": "F00000VE3V", + "country": "it", + "url": "https://www.morningstar.it/it/funds/snapshot/snapshot.aspx?id=F00000VE3V" + }, + { + "isin": "LU0816332745", + "name": "LGT (Lux) I Cat Bond Fund B USD", + "id": "F00000OVML", + "country": "IT", + "url": "https://www.morningstar.it/it/funds/snapshot/snapshot.aspx?id=F00000OVML" + } + ] + return test_fund_details + +def test_fund_details(funds_collection): + for item in funds_collection: + fund = Funds(item["id"], country=item["country"]) + assert fund.name == item["name"] + assert fund.isin == item["isin"] + +def test_key_stats(funds_collection): + for item in funds_collection: + fund = Funds(item["id"], country=item["country"]) + values = fund.keyStats() + values[4].get("ISIN") == item["isin"] + time.sleep(1) + +def test_carbon_metrics(funds_collection): + for item in funds_collection: + fund = Funds(item["id"], country=item["country"]) + data_dict = fund.carbonMetrics() + assert "categoryName" in data_dict + assert "fossilFuelInvolvementPct" in data_dict + assert "portfolioCarbonRiskScore" in data_dict + +@pytest.fixture +def funds_nav(): + nav ={ + "id": "F00000TW95", + "start_date": datetime.date(2022,4,11), + "end_date": datetime.date(2022,4,25), + "history": [ + {'nav': 12.46, 'totalReturn': 14.93951, 'date': '2022-04-11'}, + {'nav': 12.47, 'totalReturn': 14.9515, 'date': '2022-04-12'}, + {'nav': 12.53, 'totalReturn': 15.02344, 'date': '2022-04-13'}, + {'nav': 12.59, 'totalReturn': 15.09538, 'date': '2022-04-14'}, + {'totalReturn': 15.09538, 'date': '2022-04-15'}, + {'nav': 12.54, 'totalReturn': 15.03543, 'date': '2022-04-19'}, + {'nav': 12.49, 'totalReturn': 14.97548, 'date': '2022-04-20'}, + {'nav': 12.47, 'totalReturn': 14.9515, 'date': '2022-04-21'}, + {'nav': 12.53, 'totalReturn': 15.02344, 'date': '2022-04-22'}, + {'nav': 12.61, 'totalReturn': 15.11936, 'date': '2022-04-25'}, + ] + } + return nav + +def test_fund_nav(funds_nav): + fund = Funds(funds_nav["id"]) + start_date = funds_nav["start_date"] + end_date = funds_nav["end_date"] + history = fund.nav(start_date, end_date) + assert history == funds_nav["history"] + + +def test_fund_invetment_look_up(): + funds_details = Funds("myria").investmentLookup() + keys = [ + "Id", "InceptionDate", "Isin", "InvestmentType", + "Type", "Name", "Domicile", "Currency", "RiskAndRating", + "LastPrice", "Benchmark" + ] + assert len(set(keys) - set(funds_details.keys())) == 0 + + +def test_one_fund(): + funds = Funds("LU1085283973", country="fr") + funds.code + funds.isin + funds.name + funds.asset_type + funds.allocationMap() + funds.allocationWeighting() + funds.analystRating() + funds.analystRatingTopFunds() + funds.analystRatingTopFundsUpDown() + funds.benchmark() + funds.carbonMetrics() + funds.category() + funds.categoryAnnualPerformance() + funds.categoryCumulativePerformance() + funds.contact() + funds.costIllustration() + funds.couponRange() + funds.creditQuality() + funds.dataPoint("TenforeId") + funds.distribution() + funds.equityStyle() + funds.equityStyleBoxHistory() + funds.esgData() + funds.factorProfile() + funds.feeLevel() + funds.fees() + funds.financialMetrics() + funds.fixedIncomeStyle() + funds.fixedincomeStyleBoxHistory() + funds.fundsAnnualPerformance() + funds.fundsAnnualRank() + funds.fundsCumulativePerformance() + funds.fundsQuarterlyPerformance() + funds.graphData() + funds.historicalData() + funds.holdings() + funds.indexAnnualPerformance() + funds.indexCumulativePerformance() + funds.investmentStrategy() + funds.marketCapitalization() + funds.maturitySchedule() + funds.maxDrawDown() + funds.morningstarAnalyst() + funds.multiLevelFixedIncomeData() + funds.objectiveInvestment() + funds.otherFee() + funds.ownershipZone() + funds.parentMstarRating() + funds.parentSummary() + funds.people() + funds.position() + funds.productInvolvement() + funds.proxyVotingManagement() + funds.proxyVotingShareHolder() + funds.referenceIndex('category') + funds.regionalSector() + funds.regionalSectorIncludeCountries() + funds.riskReturnScatterplot() + funds.riskReturnSummary() + funds.riskVolatility() + # Only support fundType="FO" and countryId = "USA" + # funds.salesFees() + funds.sector() + funds.starRatingFundAsc() + funds.starRatingFundDesc() + funds.taxes() + funds.trailingReturn() + + + +def test_fund_retrieve_data_point(): + funds = Funds("LU1085283973", country="fr") + fields = [ + 'FeeLevel', + 'fundshareClassId' + ] + response_list = funds.dataPoint(field=fields) + diff = set(fields) - set(response_list[0].keys()) + assert len(diff) == 0 + + + + + + diff --git a/tests/test_search.py b/tests/test_search.py new file mode 100644 index 0000000..c07d39d --- /dev/null +++ b/tests/test_search.py @@ -0,0 +1,93 @@ +from mstarpy.search import search_funds, search_filter,filter_universe, search_stock, token_investment_strategy, token_chart, token_fund_information + + + +def test_filter_universe_with_one_term(): + filter_values = filter_universe("IndustryId") + assert len(filter_values["IndustryId"]) > 0 + assert "name" in filter_values["IndustryId"][0] + assert "id" in filter_values["IndustryId"][0] + assert "sectorId" in filter_values["IndustryId"][0] + filter_values = filter_universe("CategoryId") + assert len(filter_values["CategoryId"]) > 0 + assert "name" in filter_values["CategoryId"][0] + assert "id" in filter_values["CategoryId"][0] + +def test_filter_universe_with_one_list_term(): + filter_values = filter_universe(["starRating"]) + assert filter_values["starRating"] == ['1', '2', '3', '4', '5'] + +def test_filter_universe_with_mutiple_terms(): + fields = ["SectorId", "debtEquityRatio"] + filter_values = filter_universe(fields) + assert len(set(filter_values.keys()) - set(fields)) == 0 + fields = ['LargestRegion','SustainabilityRank'] + filter_values = filter_universe(fields) + assert len(set(filter_values.keys()) - set(fields)) == 0 + +def test_search_funds_with_fields(): + result = search_funds("F0GBR054PU", ["Universe", 'ExchangeId']) + assert "Universe" in result[0] + + +def test_search_funds_with_filter(): + filters={"starRating" : (">", 2)} + funds_list = search_funds("myria",["Name", "starRating"], filters=filters) + assert len(funds_list) > 0 + assert "Name" in funds_list[0] + assert "starRating" in funds_list[0] + +# print(search_filter("CategoryId")) +def test_search_filters(): + filter_options = search_filter(asset_type="stock") + assert len(filter_options) > 0 + assert "GBRReturnM12" in filter_options + assert "PBRatio" in filter_options + assert "PERatio" in filter_options + assert "PSRatio" in filter_options + +def test_search_stock(): + stock_list = search_stock('FR0014003J32','LegalName',exchange="PARIS") + assert stock_list[0]["LegalName"] == "NamR SA Ordinary Shares" + +def test_search_stock_with_fields(): + stock_list = search_stock( + "a", + field=["Name", "GBRReturnM12", "PERatio"], + exchange='HONG-KONG' + ) + assert len(stock_list) > 0 + assert "Name" in stock_list[0] + assert "GBRReturnM12" in stock_list[0] + assert "PERatio" in stock_list[0] + +def test_search_stock_with_fields_and_filter(): + response = search_stock( + term='', + field=["Name", "fundShareClassId", "GBRReturnM12", "PERatio"], + exchange='PARIS', filters={ + "PERatio" : ("<", '10'), + "GBRReturnM12" : (">", 20), + "debtEquityRatio" : (0, 5), + "SectorId" : ["IG000BA008", "IG000BA006"] } + ) + assert len(response) > 0 + assert "Name" in response[0] + assert "fundShareClassId" in response[0] + assert "GBRReturnM12" in response[0] + assert "PERatio" in response[0] + +def test_search_stock_with_page_size(): + stock = search_stock( + '', + ['SecId','TenforeId','LegalName'], + exchange="PARIS", + pageSize=10, + currency="EUR", + filters={"GBRReturnM12":(0,20)} + ) + assert len(stock) > 0 + assert "SecId" in stock[0] + assert "LegalName" in stock[0] + + diff --git a/tests/test_security.py b/tests/test_security.py new file mode 100644 index 0000000..935a638 --- /dev/null +++ b/tests/test_security.py @@ -0,0 +1,7 @@ +from mstarpy.security import Security + +def test_security(): + security = Security("visa", exchange='NYSE') + assert "Visa Inc Class A" == security.name + assert "NYSE" == security.exchange + assert "0P0000CPCP" == security.code \ No newline at end of file diff --git a/tests/test_stock.py b/tests/test_stock.py new file mode 100644 index 0000000..6edf18f --- /dev/null +++ b/tests/test_stock.py @@ -0,0 +1,93 @@ +import pytest +import datetime +from mstarpy import Funds, search_field, Stock + +@pytest.fixture +def stock_history(): + stock = { + "id": "F00000TW95", + "ticker": "MSFT", + "exchange": "NASDAQ", + "start_date": datetime.date(2022,4,11), + "end_date": datetime.date(2022,4,25), + "history": [ + {'open': 291.79, 'high': 292.61, 'low': 285.0, 'close': 285.26, 'volume': 34569264, 'previousClose': 296.97, 'date': '2022-04-11'}, + {'open': 289.235, 'high': 290.739, 'low': 280.49, 'close': 282.06, 'volume': 30966721, 'previousClose': 285.26, 'date': '2022-04-12'}, + {'open': 282.73, 'high': 288.58, 'low': 281.3, 'close': 287.62, 'volume': 21907176, 'previousClose': 282.06, 'date': '2022-04-13'}, + {'open': 288.09, 'high': 288.305, 'low': 279.32, 'close': 279.83, 'volume': 28221607, 'previousClose': 287.62, 'date': '2022-04-14'}, + {'open': 278.91, 'high': 282.46, 'low': 278.34, 'close': 280.52, 'volume': 20778000, 'previousClose': 279.83, 'date': '2022-04-18'}, + {'open': 279.38, 'high': 286.17, 'low': 278.41, 'close': 285.3, 'volume': 22297720, 'previousClose': 280.52, 'date': '2022-04-19'}, + {'open': 289.4, 'high': 289.7, 'low': 285.3702, 'close': 286.36, 'volume': 22906667, 'previousClose': 285.3, 'date': '2022-04-20'}, + {'open': 288.58, 'high': 293.3, 'low': 280.06, 'close': 280.81, 'volume': 29454587, 'previousClose': 286.36, 'date': '2022-04-21'}, + {'open': 281.68, 'high': 283.2, 'low': 273.38, 'close': 274.03, 'volume': 29405798, 'previousClose': 280.81, 'date': '2022-04-22'}, + {'open': 273.29, 'high': 281.11, 'low': 270.77, 'close': 280.72, 'volume': 35678852, 'previousClose': 274.03, 'date': '2022-04-25'}, + ] + } + return stock + +def test_stock_top_owners(): + ms = Stock("MSFT", exchange="NASDAQ") + top_owner = ms.mutualFundConcentratedOwners(top = 100) + assert "rows" in top_owner + assert "columnDefs" in top_owner + +def test_stock_asset_type(): + stock = Stock("Tesla Inc", exchange="NASDAQ") + assert stock.asset_type == "stock" + +def test_stock_isin(): + reference = { + "name": "Tesla Inc", + "ticker": "TSLA", + "exchange": "NASDAQ", + "isin": "US88160R1014", + "code": "0P0000OQN8" + } + stock = Stock(reference["name"], exchange=reference["exchange"]) + assert stock.code == reference["code"] + assert stock.isin == reference["isin"] + +def test_stock_two(): + stock = Stock("Tesla Inc", exchange="NASDAQ") + stock.name + stock.asset_type + stock.isin # ticker instead of isin + stock.analysisData() + stock.analysisReport() + stock.balanceSheet('annual', 'original') + stock.boardOfDirectors() + stock.cashFlow('annual', 'restated') + stock.dividends() + stock.esgRisk() + stock.financialHealth() + stock.financialSummary('quarterly', 'original') + stock.freeCashFlow() + stock.incomeStatement('annual', 'original') + stock.institutionBuyers(top=5) + stock.institutionConcentratedOwners(top=10) + stock.institutionOwnership() + stock.institutionSellers(top=5) + stock.keyExecutives() + stock.keyRatio() + stock.mutualFundBuyers(top=5) + stock.mutualFundConcentratedOwners(top=10) + stock.mutualFundOwnership() + stock.mutualFundSellers(top=5) + stock.operatingGrowth() + stock.operatingMargin() + stock.operatingPerformance() + stock.split() + stock.trailingTotalReturn() + stock.transactionHistory() + stock.transactionSummary() + stock.valuation() + +def test_stock_historial(stock_history): + stock = Stock( + stock_history["ticker"], + exchange=stock_history["exchange"]) + history = stock.historical( + start_date=stock_history["start_date"], + end_date=stock_history["end_date"]) + assert history == stock_history["history"] + diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 0000000..8b16460 --- /dev/null +++ b/tests/test_utils.py @@ -0,0 +1,5 @@ +from mstarpy.utils import FILTER_FUND, FILTER_STOCK, EXCHANGE + + +def test_parameters_in_filter(): + assert 'AdministratorCompanyId' in FILTER_FUND \ No newline at end of file From 7cb065ef877e294bf119f5888dd7a857c6edcaa6 Mon Sep 17 00:00:00 2001 From: schafsam Date: Wed, 14 Feb 2024 18:54:14 +0100 Subject: [PATCH 2/3] tests, add delay between method calls. --- tests/test_fund.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/test_fund.py b/tests/test_fund.py index 600e531..5efe2fc 100644 --- a/tests/test_fund.py +++ b/tests/test_fund.py @@ -91,7 +91,7 @@ def test_fund_invetment_look_up(): assert len(set(keys) - set(funds_details.keys())) == 0 -def test_one_fund(): +def test_fund_multiple_request_method(): funds = Funds("LU1085283973", country="fr") funds.code funds.isin @@ -107,7 +107,6 @@ def test_one_fund(): funds.category() funds.categoryAnnualPerformance() funds.categoryCumulativePerformance() - funds.contact() funds.costIllustration() funds.couponRange() funds.creditQuality() @@ -118,14 +117,12 @@ def test_one_fund(): funds.esgData() funds.factorProfile() funds.feeLevel() - funds.fees() funds.financialMetrics() funds.fixedIncomeStyle() funds.fixedincomeStyleBoxHistory() funds.fundsAnnualPerformance() funds.fundsAnnualRank() funds.fundsCumulativePerformance() - funds.fundsQuarterlyPerformance() funds.graphData() funds.historicalData() funds.holdings() @@ -137,7 +134,6 @@ def test_one_fund(): funds.maxDrawDown() funds.morningstarAnalyst() funds.multiLevelFixedIncomeData() - funds.objectiveInvestment() funds.otherFee() funds.ownershipZone() funds.parentMstarRating() @@ -147,7 +143,6 @@ def test_one_fund(): funds.productInvolvement() funds.proxyVotingManagement() funds.proxyVotingShareHolder() - funds.referenceIndex('category') funds.regionalSector() funds.regionalSectorIncludeCountries() funds.riskReturnScatterplot() @@ -161,6 +156,21 @@ def test_one_fund(): funds.taxes() funds.trailingReturn() +def test_fund_web_requests(): + funds = Funds("LU1085283973", country="fr") + funds.annualPerformance(cat="funds") + time.sleep(1) + funds.contact() + time.sleep(1) + funds.cumulativePerformance(cat="funds") + time.sleep(1) + funds.fees() + time.sleep(1) + funds.fundsQuarterlyPerformance() + time.sleep(1) + funds.objectiveInvestment() + time.sleep(1) + funds.referenceIndex('category') def test_fund_retrieve_data_point(): From 507e976c804a4a0fc489d5aa4b54ba1dfd5a6547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl?= Date: Mon, 19 Feb 2024 22:51:15 +0100 Subject: [PATCH 3/3] correct function name --- tests/test_fund.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_fund.py b/tests/test_fund.py index 5efe2fc..874cad6 100644 --- a/tests/test_fund.py +++ b/tests/test_fund.py @@ -158,11 +158,11 @@ def test_fund_multiple_request_method(): def test_fund_web_requests(): funds = Funds("LU1085283973", country="fr") - funds.annualPerformance(cat="funds") + funds.AnnualPerformance(cat="funds") time.sleep(1) funds.contact() time.sleep(1) - funds.cumulativePerformance(cat="funds") + funds.CumulativePerformance(cat="funds") time.sleep(1) funds.fees() time.sleep(1)