fix: collect enabled sources weekly including Checko

This commit is contained in:
Aleksandr Meshchryakov
2026-10-29 17:46:26 +01:00
parent aeade84761
commit bc9767244d
12 changed files with 196 additions and 59 deletions

View File

@@ -7,7 +7,7 @@ from unittest.mock import patch
import pytest
from apps.core.models import BackgroundJob
from apps.parsers import checko_section_snapshots as snapshots
from apps.parsers.checko_collection import claim_monthly_collection
from apps.parsers.checko_collection import claim_weekly_collection
from apps.parsers.models import ParserSourceArtifact
from apps.parsers.registry_snapshots import SnapshotValidationError
from apps.parsers.source_cards import SourceCardService
@@ -174,7 +174,7 @@ class CheckoSectionContractTests(TestCase):
def test_no_completed_failure_exposes_rejected_counters(self):
source = "checko_messages"
claim_monthly_collection(organization_id=str(self.org.uid), source=source)
claim_weekly_collection(organization_id=str(self.org.uid), source=source)
with pytest.raises(SnapshotValidationError, match="no_completed_organizations"):
self.run_task(source)
job = BackgroundJob.objects.get()