fix up the core tests that were erroring

This commit is contained in:
Damien Churchill 2010-10-22 19:42:07 +01:00
parent 2beec764c9
commit 6fd4b298f3
1 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ try:
except ImportError:
from sha import sha
import os
import common
from deluge.core.rpcserver import RPCServer
@ -32,7 +33,7 @@ class CoreTestCase(unittest.TestCase):
def test_add_torrent_file(self):
options = {}
filename = "../test.torrent"
filename = os.path.join(os.path.dirname(__file__), "test.torrent")
import base64
torrent_id = self.core.add_torrent_file(filename, base64.encodestring(open(filename).read()), options)
@ -76,7 +77,7 @@ class CoreTestCase(unittest.TestCase):
def test_remove_torrent(self):
options = {}
filename = "../test.torrent"
filename = os.path.join(os.path.dirname(__file__), "test.torrent")
import base64
torrent_id = self.core.add_torrent_file(filename, base64.encodestring(open(filename).read()), options)