mirror of
https://github.com/urbanguacamole/torrent-paradise
synced 2024-10-31 21:20:13 +00:00
8fdc8d6508
I still miss most of the trending torrents because I source new torrents mainly from the DHT.
21 lines
405 B
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))
|
|
}
|
|
}
|
|
} |