2
0
mirror of https://github.com/urbanguacamole/torrent-paradise synced 2024-10-31 21:20:13 +00:00
torrent-paradise/crawl-rss/tpb_test.go
Urban Guacamole 8fdc8d6508 Add crawl of TPB 48h top to crawl-rss
I still miss most of the trending torrents because I source new torrents mainly from the DHT.
2020-07-05 12:31:28 +02:00

21 lines
405 B
Go

package main
import (
"strconv"
"testing"
)
func TestCrawlTPB48hTop(t *testing.T) {
torrents := CrawlTPB48hTop()
if len(torrents) < 1 {
t.Error("no torrents crawled from tpb")
}
for i, torrent := range torrents {
if torrent.Length < 10 {
t.Error("bad length of torrent "+strconv.Itoa(i))
}
if len(torrent.Name) < 2 {
t.Error("weirdly short name of torrent "+strconv.Itoa(i))
}
}
}