summaryrefslogtreecommitdiff
path: root/tests/Network
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Network')
-rw-r--r--tests/Network/BitTorrent/DHT/SessionSpec.hs1
-rw-r--r--tests/Network/BitTorrent/Exchange/DownloadSpec.hs14
2 files changed, 2 insertions, 13 deletions
diff --git a/tests/Network/BitTorrent/DHT/SessionSpec.hs b/tests/Network/BitTorrent/DHT/SessionSpec.hs
index 522bd8df..a5376c32 100644
--- a/tests/Network/BitTorrent/DHT/SessionSpec.hs
+++ b/tests/Network/BitTorrent/DHT/SessionSpec.hs
@@ -5,6 +5,7 @@ import Control.Concurrent
5import Control.Exception 5import Control.Exception
6import Control.Monad.Reader 6import Control.Monad.Reader
7import Control.Monad.Trans.Resource 7import Control.Monad.Trans.Resource
8import Data.Conduit.Lazy
8import Data.Default 9import Data.Default
9import Data.List as L 10import Data.List as L
10import Test.Hspec 11import Test.Hspec
diff --git a/tests/Network/BitTorrent/Exchange/DownloadSpec.hs b/tests/Network/BitTorrent/Exchange/DownloadSpec.hs
index a0d40af3..d46f2034 100644
--- a/tests/Network/BitTorrent/Exchange/DownloadSpec.hs
+++ b/tests/Network/BitTorrent/Exchange/DownloadSpec.hs
@@ -33,19 +33,7 @@ withUpdates m = do
33 undefined 33 undefined
34 34
35simulateFetch :: InfoDict -> Updates s (Maybe InfoDict) 35simulateFetch :: InfoDict -> Updates s (Maybe InfoDict)
36simulateFetch dict = go 36simulateFetch dict = undefined
37 where
38 blocks = chunkBy metadataPieceSize (BL.toStrict (BE.encode dict))
39 packPiece ix = Torrent.Piece ix (blocks !! ix)
40 ih = idInfoHash dict
41
42 go = do
43 mix <- scheduleBlock undefined undefined
44 case mix of
45 Nothing -> return Nothing
46 Just ix -> do
47 mdict <- pushBlock undefined (packPiece ix)
48 maybe go (return . Just) mdict
49 37
50spec :: Spec 38spec :: Spec
51spec = do 39spec = do