]> git.rkrishnan.org Git - functorrent.git/blobdiff - test/Test.hs
Clean up tracker network code
[functorrent.git] / test / Test.hs
index 3ead970aa024b32d8e2ba3473b2ca474041c1ebf..fb6c768e3fe45c58884106f3c02ef5c9927c84d8 100644 (file)
@@ -2,7 +2,8 @@
 module Main where
 
 import Prelude hiding (readFile)
-import Data.ByteString.Char8 (ByteString, readFile)
+
+import Data.ByteString (ByteString, readFile)
 import Data.Map.Strict (fromList)
 
 import Test.Tasty
@@ -11,7 +12,7 @@ import Test.Tasty.HUnit
 import FuncTorrent.Bencode (decode, BVal(..))
 import FuncTorrent.Metainfo (Info(..), Metainfo(..), mkMetaInfo)
 import FuncTorrent.Peer (Peer(..))
-import FuncTorrent.Tracker (TrackerResponse(..), peers, mkTrackerResponse)
+import FuncTorrent.Tracker
 
 -- Parsed .torrent file
 file :: BVal
@@ -38,6 +39,7 @@ hello = Metainfo {
             lengthInBytes = 12,
             md5sum = Nothing
           },
+          infoHash = "\249\SYN\145=\129\182\205\\\181v0\144\154\EM\150f\152\221]}",
           announceList = ["http://9.rarbg.com:2710/announce"],
           creationDate = Just 1428717851,
           comment = Just "hello world",