Skip to content
This repository has been archived by the owner on Jan 13, 2018. It is now read-only.

Commit

Permalink
Remove: Unnecessary db tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Salisbury committed Aug 18, 2010
1 parent de4eb6a commit b1e2c70
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions tests/tracker_tests.py
Expand Up @@ -6,30 +6,6 @@
import os
import pickle

class Read_Torrent_DB(unittest.TestCase):
""" Test that we can read the database correctly. """

def test_simple_reading(self):
""" Test that a read works correctly. """

with open("test.txt", "w") as file:
pickle.dump("test", file)
self.n = tracker.read_torrent_db("test.txt")
self.assertEqual(self.n, "test")
os.remove("test.txt")

class Write_Torrent_DB(unittest.TestCase):
""" Test that we can write the database correctly. """

def test_simple_writing(self):
""" Test that a write works correctly. """

tracker.write_torrent_db("test.txt", "test")
with open("test.txt") as file:
self.n = pickle.load(file)
self.assertEqual(self.n, "test")
os.remove("test.txt")

class Decode_Request(unittest.TestCase):
""" Test that we can decode GET requests correctly. """

Expand Down Expand Up @@ -166,11 +142,6 @@ def test_interval(self):

self.assertEqual(self.interval, self.tracker.server_class.interval)

def test_database(self):
""" Test that the database is present. """

self.assertEqual(self.tracker.server_class.torrents, {})

def tearDown(self):
""" Stop the tracker. """

Expand Down

0 comments on commit b1e2c70

Please sign in to comment.