feat(sources): retire Yahoo and CNBC feeds (#42)

This commit is contained in:
2026-11-25 02:00:25 +01:00
parent 7a342f240d
commit 0503c2653f
41 changed files with 603 additions and 173 deletions

View File

@ -8,7 +8,7 @@ import (
)
func TestTicket39NoContentIsExplicit(t *testing.T) {
key := models.SourceYahooFinance
key := models.SourceBloomberg
repo := &contractRepository{inputs: map[string]UserInput{"u": {Language: "fr", RankingMode: "title_content", GlobalLimit: 2, Assets: []models.UserAsset{{Name: "Fixture"}}, Sources: []models.Source{{ID: "s", SourceKey: &key, Enabled: true, ArticleLimit: 2}}}}, saved: map[string][]GenerationRecord{}}
sum := &contractSummarizer{}
r, err := NewUseCase(Dependencies{Repository: repo, Decider: &allYesMention{}, Summarizer: sum, Scrapers: map[string]scraper.Scraper{key: &contractScraper{articles: []scraper.Article{{Title: "Fixture", Content: "RSS teaser", ContentTruncated: true}}}}}).Generate(context.Background(), "u")
@ -42,7 +42,7 @@ func (f *ticket39ContentFeed) Enrich(_ context.Context, a []scraper.Article) ([]
return out, nil
}
func TestTicket39AllRuntimeSourcesEnrichAfterLimitAndOnlyCompleteSelectable(t *testing.T) {
for _, key := range []string{models.SourceBloomberg, models.SourceYahooFinance, models.SourceCNBCBusiness} {
for _, key := range []string{models.SourceBloomberg, models.SourceInvesting} {
t.Run(key, func(t *testing.T) {
feed := &ticket39ContentFeed{}
repo := &contractRepository{inputs: map[string]UserInput{"u": {Language: "fr", RankingMode: "title_content", GlobalLimit: 3, Assets: []models.UserAsset{{Name: "Followed fixture"}}, Sources: []models.Source{{ID: "s", SourceKey: &key, Enabled: true, ArticleLimit: 3}}}}, saved: map[string][]GenerationRecord{}}