Skip to content

Commit e10624c

Browse files
committed
Remove URL Error Status
1 parent fe67257 commit e10624c

8 files changed

Lines changed: 9 additions & 36 deletions

File tree

tests/automated/integration/api/batch/summaries/test_happy_path.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ async def test_get_batch_summaries(api_test_helper):
2929
count=4,
3030
status=URLCreationEnum.NOT_RELEVANT
3131
),
32-
TestURLCreationParameters(
33-
count=3,
34-
status=URLCreationEnum.ERROR
35-
)
3632
]
3733
),
3834
TestBatchCreationParameters(
@@ -78,10 +74,10 @@ async def test_get_batch_summaries(api_test_helper):
7874
result_2 = results[1]
7975
assert result_2.id == batch_2_id
8076
counts_2 = result_2.url_counts
81-
assert counts_2.total == 7
77+
assert counts_2.total == 4
8278
assert counts_2.not_relevant == 4
83-
assert counts_2.errored == 3
84-
assert counts_2.pending == 3
79+
assert counts_2.errored == 0
80+
assert counts_2.pending == 0
8581
assert counts_2.submitted == 0
8682
assert counts_2.duplicate == 0
8783

tests/automated/integration/api/metrics/batches/test_breakdown.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ async def test_get_batches_breakdown_metrics(api_test_helper):
4949
strategy=CollectorType.AUTO_GOOGLER,
5050
date_generated=today - timedelta(days=14)
5151
)
52-
error_url_mappings: list[SimpleURLMapping] = await create_urls(
53-
adb_client=adb_client,
54-
status=URLStatus.ERROR,
55-
count=4,
56-
)
57-
error_url_ids: list[int] = [url_mapping.url_id for url_mapping in error_url_mappings]
5852
validated_url_mappings: list[SimpleURLMapping] = await create_urls(
5953
adb_client=adb_client,
6054
count=8,
@@ -73,7 +67,7 @@ async def test_get_batches_breakdown_metrics(api_test_helper):
7367
await create_batch_url_links(
7468
adb_client=adb_client,
7569
batch_id=batch_id_3,
76-
url_ids=error_url_ids + validated_url_ids,
70+
url_ids=validated_url_ids,
7771
)
7872

7973

@@ -107,11 +101,11 @@ async def test_get_batches_breakdown_metrics(api_test_helper):
107101
assert dto_batch_3.batch_id == batch_id_3
108102
assert dto_batch_3.status == BatchStatus.READY_TO_LABEL
109103
assert dto_batch_3.strategy == CollectorType.AUTO_GOOGLER
110-
assert dto_batch_3.count_url_total == 12
111-
assert dto_batch_3.count_url_pending == 5
104+
assert dto_batch_3.count_url_total == 8
105+
assert dto_batch_3.count_url_pending == 1
112106
assert dto_batch_3.count_url_submitted == 0
113107
assert dto_batch_3.count_url_rejected == 3
114-
assert dto_batch_3.count_url_error == 4
108+
assert dto_batch_3.count_url_error == 0
115109
assert dto_batch_3.count_url_validated == 7
116110

117111
dto_2 = await ath.request_validator.get_batches_breakdown_metrics(

tests/automated/integration/api/metrics/test_backlog.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ async def test_get_backlog_metrics(api_test_helper):
4646
url_ids=not_relevant_url_ids_2[:4],
4747
validation_type=URLType.NOT_RELEVANT
4848
)
49-
error_url_mappings_2: list[SimpleURLMapping] = await ddc.create_urls(
50-
status=URLStatus.ERROR,
51-
count=2
52-
)
53-
error_url_ids_2: list[int] = [url_mapping.url_id for url_mapping in error_url_mappings_2]
54-
await ddc.create_batch_url_links(url_ids=error_url_ids_2, batch_id=batch_2_id)
5549

5650
await adb_client.populate_backlog_snapshot(
5751
dt=today.subtract(months=2).naive()

tests/automated/integration/api/metrics/urls/aggregated/test_core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ async def test_get_urls_aggregated_metrics(api_test_helper):
4747
strategy=CollectorType.AUTO_GOOGLER,
4848
)
4949
url_mappings_2_ok: list[SimpleURLMapping] = await ddc.create_urls(batch_id=batch_2, count=4, status=URLStatus.OK)
50-
url_mappings_2_error: list[SimpleURLMapping] = await ddc.create_urls(batch_id=batch_2, count=2, status=URLStatus.ERROR)
5150
url_mappings_2_validated: list[SimpleURLMapping] = await ddc.create_validated_urls(count=1, validation_type=URLType.DATA_SOURCE)
5251
url_mappings_2_not_relevant: list[SimpleURLMapping] = await ddc.create_validated_urls(count=5, validation_type=URLType.NOT_RELEVANT)
5352
url_ids_2_validated: list[int] = [url_mapping.url_id for url_mapping in url_mappings_2_validated]

tests/automated/integration/api/metrics/urls/breakdown/test_pending.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ async def test_get_urls_breakdown_pending_metrics(api_test_helper):
6464
count=3,
6565
status=URLCreationEnum.SUBMITTED
6666
),
67-
TestURLCreationParameters(
68-
count=4,
69-
status=URLCreationEnum.ERROR
70-
),
7167
TestURLCreationParameters(
7268
count=5,
7369
status=URLCreationEnum.OK,

tests/automated/integration/api/metrics/urls/breakdown/test_submitted.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ async def test_get_urls_breakdown_submitted_metrics(api_test_helper):
4747
count=3,
4848
status=URLCreationEnum.SUBMITTED
4949
),
50-
TestURLCreationParameters(
51-
count=4,
52-
status=URLCreationEnum.ERROR
53-
),
5450
TestURLCreationParameters(
5551
count=5,
5652
status=URLCreationEnum.VALIDATED

tests/manual/agency_identifier/test_nlp_processor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pytest
22

3-
from src.core.tasks.url.operators.agency_identification.subtasks.impl.nlp_location_match_.processor import \
4-
NLPProcessor
3+
from src.core.tasks.url.operators.location_id.subtasks.impl.nlp_location_freq.processor.nlp.core import NLPProcessor
54

65
SAMPLE_HTML: str = """
76
<html>

tests/manual/core/lifecycle/test_auto_googler_lifecycle.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
import dotenv
44

55
from src.db.models.impl.batch.pydantic.info import BatchInfo
6-
from src.collectors import CollectorType
6+
from src.collectors.enums import CollectorType
77
from src.core.enums import BatchStatus
8-
from test_automated.integration.core.helpers.common_test_procedures import run_collector_and_wait_for_completion
98

109

1110
def test_auto_googler_collector_lifecycle(test_core):

0 commit comments

Comments
 (0)