Skip to content

Commit

Permalink
update feature api tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Keegan Cordeiro committed Jan 15, 2025
1 parent 250c190 commit 1a39bcd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/endpoints/v1/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def test_mutate_default_criteria(self, client):
"phq_spend_performing_arts_transportation": {"stats": ["sum", "count"], "phq_rank": None},
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand Down Expand Up @@ -114,6 +115,7 @@ def test_attendance_request_params_underscores(self, client):
"phq_attendance_sports_hospitality": {"stats": feature_stats},
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand All @@ -130,6 +132,7 @@ def test_attendance_request_params_underscores_without_ssl_verification(self, cl
"location": {"place_id": ["4671654"]},
},
verify=False,
params=None
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand Down Expand Up @@ -196,6 +199,7 @@ def test_attendance_request_params_dicts(self, client):
"phq_attendance_sports_hospitality": feature_criteria,
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand All @@ -214,6 +218,7 @@ def test_attendance_request_params_dicts_without_ssl_verification(self, client):
"location": {"geo": {"lat": 41.75038, "lon": -71.49978, "radius": "30km"}},
},
verify=False,
params=None
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand Down Expand Up @@ -250,6 +255,7 @@ def test_rank_request_params_underscores(self, client):
"phq_rank_academic_holiday": True,
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand All @@ -268,6 +274,7 @@ def test_rank_request_params_underscores_without_ssl_verification(self, client):
"location": {"geo": {"lat": 41.75038, "lon": -71.49978, "radius": "30km"}},
},
verify=False,
params=None
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand Down Expand Up @@ -303,6 +310,7 @@ def test_rank_request_params_dicts(self, client):
"phq_rank_academic_holiday": True,
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand All @@ -319,6 +327,7 @@ def test_rank_request_params_dicts_without_ssl_verification(self, client):
"location": {"place_id": ["4671654"]},
},
verify=False,
params=None
)

@with_client()
Expand Down Expand Up @@ -379,6 +388,7 @@ def test_impact_severe_weather_request_params_underscores(self, client):
"phq_impact_severe_weather_tropical_storm_retail": {"stats": feature_stats},
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand Down Expand Up @@ -425,6 +435,7 @@ def test_impact_severe_weather_request_params_dicts(self, client):
"phq_impact_severe_weather_tropical_storm_retail": feature_criteria,
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand Down Expand Up @@ -463,6 +474,7 @@ def test_viewership_request_params_underscores(self, client):
"phq_viewership_sports_golf_pga_championship": {"stats": feature_stats},
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand All @@ -481,6 +493,7 @@ def test_viewership_request_params_underscores_without_ssl_verification(self, cl
"location": {"place_id": ["4671654"]},
},
verify=False,
params=None
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand Down Expand Up @@ -517,6 +530,7 @@ def test_viewership_request_params_dicts(self, client):
"phq_viewership_sports_horse_racing": feature_criteria,
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand All @@ -535,6 +549,7 @@ def test_viewership_request_params_dicts_without_ssl_verification(self, client):
"location": {"geo": {"lat": 41.75038, "lon": -71.49978, "radius": "30km"}},
},
verify=False,
params=None
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand Down Expand Up @@ -610,6 +625,7 @@ def test_spend_request_params_underscores(self, client):
"phq_spend_performing_arts_transportation": {"stats": feature_stats},
},
verify=True,
params=None,
)

@with_mock_client(request_returns=load_fixture("requests_responses/features_test/test_empty_search"))
Expand Down Expand Up @@ -684,4 +700,5 @@ def test_spend_request_params_dicts(self, client):
"phq_spend_performing_arts_transportation": feature_criteria,
},
verify=True,
params=None,
)

0 comments on commit 1a39bcd

Please sign in to comment.