Skip to content

Commit fd5397e

Browse files
committed
remove redundant tests
1 parent 0abc1a9 commit fd5397e

File tree

2 files changed

+0
-63
lines changed

2 files changed

+0
-63
lines changed

tests/unit/ingestion/data_transfer_models/headline/test_headline.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -159,36 +159,6 @@ def test_validates_date_passed_to_embargo(self):
159159
assert validated_embargo.minute == 0
160160
assert validated_embargo.second == 0
161161

162-
@pytest.mark.parametrize("is_public", [True, False])
163-
@mock.patch(f"{MODULE_PATH}.AUTH_ENABLED", True)
164-
def test_validates_public_or_private_data_when_auth_enabled_is_true(
165-
self, is_public: bool
166-
):
167-
"""
168-
Given a payload containing `is_public` as True or False
169-
And `AUTH_ENABLED` is set to True
170-
When the `InboundHeadlineSpecificFields` model is initialized
171-
Then model is deemed valid
172-
"""
173-
# Given
174-
fake_period_start = "2023-11-20"
175-
fake_period_end = VALID_DATETIME
176-
177-
# When
178-
inbound_headline_specific_fields_validation = InboundHeadlineSpecificFields(
179-
period_start=fake_period_start,
180-
period_end=fake_period_end,
181-
metric_value=123,
182-
embargo=None,
183-
is_public=is_public,
184-
)
185-
186-
# Then
187-
inbound_headline_specific_fields_validation.model_validate(
188-
inbound_headline_specific_fields_validation,
189-
strict=True,
190-
)
191-
192162

193163
class TestHeadlineDTO:
194164
def test_casts_upper_and_lower_level_fields(

tests/unit/ingestion/data_transfer_models/time_series/test_time_series.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616

1717
class TestInboundTimeSeriesSpecificFields:
18-
@mock.patch(f"{MODULE_PATH}.AUTH_ENABLED", False)
1918
def test_validates_payload(self):
2019
"""
2120
Given a payload containing valid values
@@ -148,38 +147,6 @@ def test_raises_error_when_date_passed_to_embargo(self):
148147
assert validated_embargo.minute == 0
149148
assert validated_embargo.second == 0
150149

151-
@pytest.mark.parametrize("is_public", [True, False])
152-
@mock.patch(f"{MODULE_PATH}.AUTH_ENABLED", True)
153-
def test_validates_public_or_private_data_when_auth_enabled_is_true(
154-
self, is_public: bool
155-
):
156-
"""
157-
Given a payload containing `is_public` as True or False
158-
And `AUTH_ENABLED` is set to True
159-
When the `InboundTimeSeriesSpecificFields` model is initialized
160-
Then model is deemed valid
161-
"""
162-
# Given
163-
fake_embargo = VALID_DATETIME
164-
fake_metric_value = 123
165-
166-
# When
167-
inbound_time_series_specific_fields_validation = (
168-
InboundTimeSeriesSpecificFields(
169-
epiweek=46,
170-
date="2023-11-01",
171-
embargo=fake_embargo,
172-
metric_value=fake_metric_value,
173-
is_public=is_public,
174-
)
175-
)
176-
177-
# Then
178-
inbound_time_series_specific_fields_validation.model_validate(
179-
inbound_time_series_specific_fields_validation,
180-
strict=True,
181-
)
182-
183150

184151
class TestTimeSeriesDTO:
185152
def test_casts_upper_and_lower_level_fields(

0 commit comments

Comments
 (0)