Module: deluge Branch: master Commit: 7d64f057c746d8349745e396711ab26aec4534d3
Author: Andrew Resch <[email protected]> Date: Wed Aug 18 12:15:16 2010 -0700 Add additional test for get_torrents_status and fix the other one to properly invalidate the cache time from startup before proceeding --- tests/test_sessionproxy.py | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/tests/test_sessionproxy.py b/tests/test_sessionproxy.py index d0e051e..bc336c6 100644 --- a/tests/test_sessionproxy.py +++ b/tests/test_sessionproxy.py @@ -112,8 +112,17 @@ class SessionProxyTestCase(unittest.TestCase): return d def test_get_torrent_status_key_not_updated(self): + time.sleep(self.sp.cache_time + 0.1) 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 + + def test_get_torrents_status_key_not_updated(self): + time.sleep(self.sp.cache_time + 0.1) + self.sp.get_torrents_status({"id": ["a"]}, ["key1"]) + client.core.torrents["a"]["key2"] = 99 + d = self.sp.get_torrents_status({"id": ["a"]}, ["key2"]) + d.addCallback(self.assertEquals, {"a": {"key2": 99}}) + return d -- 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.
