Module: deluge
Branch: master
Commit: 6fd4b298f3d491ce511a38d1cd244de9235e1e27

Author: Damien Churchill <[email protected]>
Date:   Fri Oct 22 19:42:07 2010 +0100

fix up the core tests that were erroring

---

 deluge/tests/test_core.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/deluge/tests/test_core.py b/deluge/tests/test_core.py
index 3d1a6e7..1e74f30 100644
--- a/deluge/tests/test_core.py
+++ b/deluge/tests/test_core.py
@@ -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)
 

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to