[tor-commits] [nyx/master] Update tests to reflect resolver change

atagar at torproject.org atagar at torproject.org
Fri Nov 3 19:33:19 UTC 2017


commit 157b9b3602204d19c969c9f0ee562fcf812847b2
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Nov 3 12:32:59 2017 -0700

    Update tests to reflect resolver change
---
 test/tracker/connection_tracker.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/tracker/connection_tracker.py b/test/tracker/connection_tracker.py
index 672240b..20f0095 100644
--- a/test/tracker/connection_tracker.py
+++ b/test/tracker/connection_tracker.py
@@ -1,7 +1,7 @@
 import time
 import unittest
 
-from nyx.tracker import ConnectionTracker
+from nyx.tracker import CustomResolver, ConnectionTracker
 
 from stem.util import connection
 
@@ -55,17 +55,17 @@ class TestConnectionTracker(unittest.TestCase):
     with ConnectionTracker(0.01) as daemon:
       time.sleep(0.015)
 
-      self.assertEqual([connection.Resolver.NETSTAT, connection.Resolver.LSOF], daemon._resolvers)
+      self.assertEqual([connection.Resolver.NETSTAT, connection.Resolver.LSOF, CustomResolver.INFERENCE], daemon._resolvers)
       self.assertEqual([], daemon.get_value())
 
       time.sleep(0.025)
 
-      self.assertEqual([connection.Resolver.LSOF], daemon._resolvers)
+      self.assertEqual([connection.Resolver.LSOF, CustomResolver.INFERENCE], daemon._resolvers)
       self.assertEqual([], daemon.get_value())
 
       time.sleep(0.035)
 
-      self.assertEqual([], daemon._resolvers)
+      self.assertEqual([CustomResolver.INFERENCE], daemon._resolvers)
       self.assertEqual([], daemon.get_value())
 
       # Now make connection resolution work. We still shouldn't provide any



More information about the tor-commits mailing list