summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Resch <andrewresch@gmail.com>2010-08-18 11:05:21 -0700
committerAndrew Resch <andrewresch@gmail.com>2010-08-18 11:05:21 -0700
commit79749cca037ec60c16a409133f72d2fe67ac8c7f (patch)
tree845331cc9bc96fb441e3962f3ba5c5c6436b17fb
parent5fd86287615e82a063c044144187e11548078415 (diff)
downloaddeluge-79749cca037ec60c16a409133f72d2fe67ac8c7f.tar.gz
deluge-79749cca037ec60c16a409133f72d2fe67ac8c7f.tar.bz2
deluge-79749cca037ec60c16a409133f72d2fe67ac8c7f.zip
Add test to demonstrate flaw in SessionProxy design. Need to keep track of update times for each
status key individually to fix this.
-rw-r--r--tests/test_sessionproxy.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_sessionproxy.py b/tests/test_sessionproxy.py
index 1214214d8..d0e051e3d 100644
--- a/tests/test_sessionproxy.py
+++ b/tests/test_sessionproxy.py
@@ -110,3 +110,10 @@ class SessionProxyTestCase(unittest.TestCase):
d = self.sp.get_torrent_status("a", [])
d.addCallback(self.assertEquals, client.core.torrents["a"])
return d
+
+ def test_get_torrent_status_key_not_updated(self):
+ self.sp.get_torrent_status("a", ["key1"])
+ client.core.torrents["a"]["key2"] = 99
+ d = self.sp.get_torrent_status("a", ["key2"])
+ d.addCallback(self.assertEquals, {"key2": 99})
+ return d