[tor-commits] [stem/master] Displaying tor version in header broke unit test
atagar at torproject.org
atagar at torproject.org
Mon Jan 30 18:31:26 UTC 2017
commit 74999de6a93bd58747a3f8516f17c546e8f61d11
Author: Damian Johnson <atagar at torproject.org>
Date: Sun Jan 22 16:01:13 2017 -0800
Displaying tor version in header broke unit test
Oops, thought we mocked out the version cache but seems that's not the case.
---
test/unit/version.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/unit/version.py b/test/unit/version.py
index 2d9803e..2518a41 100644
--- a/test/unit/version.py
+++ b/test/unit/version.py
@@ -27,13 +27,13 @@ class TestVersion(unittest.TestCase):
def test_get_system_tor_version(self, call_mock):
call_mock.return_value = TOR_VERSION_OUTPUT.splitlines()
- version = stem.version.get_system_tor_version()
+ version = stem.version.get_system_tor_version('tor_unit')
self.assert_versions_match(version, 0, 2, 2, 35, None, 'git-73ff13ab3cc9570d')
self.assertEqual('73ff13ab3cc9570d', version.git_commit)
- call_mock.assert_called_once_with('tor --version')
+ call_mock.assert_called_once_with('tor_unit --version')
- self.assertEqual({'tor': version}, stem.version.VERSION_CACHE)
+ self.assertEqual(stem.version.VERSION_CACHE['tor_unit'], version)
def test_parsing(self):
"""
More information about the tor-commits
mailing list