[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Displaying tor version in header broke unit test
commit 74999de6a93bd58747a3f8516f17c546e8f61d11
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
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):
"""
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits