Skip to content

Commit 06d6190

Browse files
committed
Remove tests linked to removed validation
1 parent fe19881 commit 06d6190

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

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

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

162-
@mock.patch(f"{MODULE_PATH}.AUTH_ENABLED", False)
163-
def test_raises_error_when_non_public_data_passed_to_public_platform(self):
164-
"""
165-
Given a payload with `is_public` set to False
166-
And `AUTH_ENABLED` is set to False
167-
When the `InboundHeadlineSpecificFields` model is initialized
168-
Then a `ValidationError` is raised
169-
"""
170-
# Given
171-
fake_period_start = "2023-11-20"
172-
fake_period_end = "2023-11-27"
173-
fake_embargo = "2023-11-30"
174-
175-
# When / Then
176-
with pytest.raises(ValidationError):
177-
InboundHeadlineSpecificFields(
178-
period_start=fake_period_start,
179-
period_end=fake_period_end,
180-
embargo=fake_embargo,
181-
metric_value=123,
182-
is_public=False,
183-
)
184162

185163
@pytest.mark.parametrize("is_public", [True, False])
186164
@mock.patch(f"{MODULE_PATH}.AUTH_ENABLED", True)

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -148,26 +148,6 @@ def test_raises_error_when_date_passed_to_embargo(self):
148148
assert validated_embargo.minute == 0
149149
assert validated_embargo.second == 0
150150

151-
@mock.patch(f"{MODULE_PATH}.AUTH_ENABLED", False)
152-
def test_raises_error_when_non_public_data_passed_to_public_platform(self):
153-
"""
154-
Given a payload with `is_public` set to False
155-
And `AUTH_ENABLED` is set to False
156-
When the `InboundTimeSeriesSpecificFields` model is initialized
157-
Then a `ValidationError` is raised
158-
"""
159-
# Given
160-
161-
# When / Then
162-
with pytest.raises(ValidationError):
163-
InboundTimeSeriesSpecificFields(
164-
epiweek=1,
165-
date="2023-11-20",
166-
embargo=VALID_DATETIME,
167-
metric_value=123,
168-
is_public=False,
169-
)
170-
171151
@pytest.mark.parametrize("is_public", [True, False])
172152
@mock.patch(f"{MODULE_PATH}.AUTH_ENABLED", True)
173153
def test_validates_public_or_private_data_when_auth_enabled_is_true(

0 commit comments

Comments
 (0)