|
5 | 5 |
|
6 | 6 | from feeds.impl.models.search_feed_item_result_impl import SearchFeedItemResultImpl |
7 | 7 | from feeds_gen.models.latest_dataset import LatestDataset |
| 8 | +from feeds_gen.models.latest_dataset_validation_report import LatestDatasetValidationReport |
8 | 9 | from feeds_gen.models.location import Location |
9 | 10 | from feeds_gen.models.source_info import SourceInfo |
10 | 11 |
|
@@ -43,6 +44,13 @@ def __init__(self, **kwargs): |
43 | 44 | latest_dataset_service_date_range_start="2030-09-29T00:00:00+00:00", |
44 | 45 | latest_dataset_service_date_range_end="2031-09-29T00:00:00+00:00", |
45 | 46 | latest_dataset_agency_timezone="Canada/Atlantic", |
| 47 | + latest_total_error=1, |
| 48 | + latest_total_warning=2, |
| 49 | + latest_total_info=3, |
| 50 | + latest_unique_error_count=1, |
| 51 | + latest_unique_warning_count=2, |
| 52 | + latest_unique_info_count=3, |
| 53 | + latest_dataset_features=["feature1", "feature2"], |
46 | 54 | external_ids=[], |
47 | 55 | redirect_ids=[], |
48 | 56 | feed_reference_ids=[], |
@@ -86,6 +94,15 @@ def test_from_orm_gtfs(self): |
86 | 94 | service_date_range_start=item.latest_dataset_service_date_range_start, |
87 | 95 | service_date_range_end=item.latest_dataset_service_date_range_end, |
88 | 96 | agency_timezone=item.latest_dataset_agency_timezone, |
| 97 | + validation_report=LatestDatasetValidationReport( |
| 98 | + total_error=item.latest_total_error, |
| 99 | + total_warning=item.latest_total_warning, |
| 100 | + total_info=item.latest_total_info, |
| 101 | + unique_error_count=item.latest_unique_error_count, |
| 102 | + unique_warning_count=item.latest_unique_warning_count, |
| 103 | + unique_info_count=item.latest_unique_info_count, |
| 104 | + features=item.latest_dataset_features, |
| 105 | + ), |
89 | 106 | ), |
90 | 107 | ) |
91 | 108 | assert result == expected |
|
0 commit comments