Skip to content

Commit e43eeaa

Browse files
committed
unit tests fixes
1 parent 51cdd09 commit e43eeaa

4 files changed

Lines changed: 14 additions & 12 deletions

File tree

tests/common_parameters.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Set 'ANALYTICS_API_URL' environment variable with api url as value
99
base_url = 'https://api.factset.com' if not os.getenv("ANALYTICS_API_URL") else os.getenv("ANALYTICS_API_URL")
1010

11-
pa_default_document = "PA_DOCUMENTS:DEFAULT"
11+
pa_default_document = "PA3_DOCUMENTS:PA_API_DEFAULT_DOCUMENT-RBICS"
1212
pa_default_component_name = "Weights"
1313
pa_default_component_category = "Weights / Exposures"
1414
pa_benchmark_sp500 = "BENCH:SP50"
@@ -19,11 +19,11 @@
1919
spar_benchmark_russell_p_r1000 = "RUSSELL_P:R.2000"
2020
spar_benchmark_russell_prefix = "RUSSELL"
2121
spar_benchmark_russell_return_type = "GTR"
22-
vault_default_document = "Client:/aapi/VAULT_QA_PI_DEFAULT_LOCKED"
23-
vault_default_account = "CLIENT:/BISAM/REPOSITORY/QA/SMALL_PORT.ACCT"
24-
vault_start_date = "20180101"
25-
vault_end_date = "20180329"
26-
pub_document_name = "Super_client:/publisher/Equity Snapshot.PUB_BRIDGE_PDF"
22+
vault_default_document = "CLIENT:/YETI/YETI-API-TEST"
23+
vault_default_account = "CLIENT:/YETI/YETI-API-TEST.ACCT"
24+
vault_start_date = "20211231"
25+
vault_end_date = "20220131"
26+
pub_document_name = "Client:/AAPI/Puma Narrative Test.PUB_BRIDGE_PDF"
2727
pub_account_name = "BENCH:SP50"
2828
pub_start_date = "-1M"
2929
pub_end_date = "0M"
@@ -32,3 +32,4 @@
3232
default_dates_frequency = "Monthly"
3333
default_dates_account = "CLIENT:/BISAM/REPOSITORY/QA/SMALL_PORT.ACCT"
3434
default_lookup_directory = "client:"
35+
spar_account = "client:/aapi/spar3_qa_test_document"

tests/test_components_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def test_get_all_spar_components(self):
9898

9999
def test_get_spar_component_by_id(self):
100100
response = self.components_api.get_spar_components(
101-
document=common_parameters.spar_default_document,
101+
document=common_parameters.spar_account,
102102
_return_http_data_only=False
103103
)
104104
component_id = list(response[0]['data'].keys())[0]

tests/test_pub_calculations_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def create_calculation(test_context):
2727
pub_account = PubIdentifier(id="Client:DOMESTIC_2.ACCT")
2828
pub_dates = PubDateParameters(startdate="20180101", enddate="20180331")
2929

30-
pub_calculation_parameters = {"1": PubCalculationParameters(document="Client:/AAPI/Puma Test Doc.Pub_bridge_pdf",
30+
pub_calculation_parameters = {"1": PubCalculationParameters(document="Client:/AAPI/Puma Narrative Test.PUB_BRIDGE_PDF",
3131
account=pub_account, dates=pub_dates)}
3232

3333
pub_calculation_parameter_root = PubCalculationParametersRoot(

tests/test_vault_calculations_api.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ def test_single_unit_scenario(self):
3030
def create_calculation(test_context):
3131
print("Creating single unit calculation")
3232
components = self.components_api.get_vault_components(
33-
document="Client:/aapi/VAULT_QA_PI_DEFAULT_LOCKED",
33+
document="CLIENT:/YETI/YETI-API-TEST",
3434
_return_http_data_only=True)
3535
component_summary = ComponentSummary(
36-
name="Total Returns", category="Performance / Performance Relative Dates")
36+
name="7D-Returns", category="General / 7D")
37+
3738
component_id = [id for id in list(
3839
components.data.keys()) if components.data[id] == component_summary][0]
39-
account = "CLIENT:/BISAM/REPOSITORY/QA/SMALL_PORT.ACCT"
40+
account = "CLIENT:/YETI/YETI-API-TEST.ACCT"
4041
vault_account = VaultIdentifier(id=account)
4142
vault_dates = VaultDateParameters(
42-
startdate="20180101", enddate="20180329", frequency="Monthly")
43+
startdate="20211231", enddate="20220131", frequency="Monthly")
4344

4445
configurations = self.configurations_api.get_vault_configurations(
4546
account,

0 commit comments

Comments
 (0)