feat(prospecting): add complete prospecting module for lead discovery and scoring
Some checks failed
Some checks failed
Migrates scanning pipeline from marketing-.lu-domains app into Orion module. Supports digital (domain scan) and offline (manual capture) lead channels with enrichment, scoring, campaign management, and interaction tracking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
36
app/modules/prospecting/tests/unit/test_stats_service.py
Normal file
36
app/modules/prospecting/tests/unit/test_stats_service.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# app/modules/prospecting/tests/unit/test_stats_service.py
|
||||
"""
|
||||
Unit tests for StatsService.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from app.modules.prospecting.services.stats_service import StatsService
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.prospecting
|
||||
class TestStatsService:
|
||||
"""Tests for StatsService."""
|
||||
|
||||
def setup_method(self):
|
||||
self.service = StatsService()
|
||||
|
||||
def test_get_overview_empty(self, db):
|
||||
"""Test overview stats with no data."""
|
||||
stats = self.service.get_overview(db)
|
||||
assert "total_prospects" in stats
|
||||
assert stats["total_prospects"] == 0
|
||||
|
||||
def test_get_overview_with_data(self, db, digital_prospect, offline_prospect):
|
||||
"""Test overview stats with data."""
|
||||
stats = self.service.get_overview(db)
|
||||
assert stats["total_prospects"] >= 2
|
||||
assert stats["digital_count"] >= 1
|
||||
assert stats["offline_count"] >= 1
|
||||
|
||||
def test_get_scan_jobs_empty(self, db):
|
||||
"""Test getting scan jobs when none exist."""
|
||||
jobs, total = self.service.get_scan_jobs(db)
|
||||
assert total == 0
|
||||
assert jobs == []
|
||||
Reference in New Issue
Block a user