You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
torrent-paradise/crawl-rss/tpb_test.go

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))
}
}
}