[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Update tests to reflect change of syntax in NetTestLoader



commit 845c33254e5ca972d7d33c01d4681442a2c2f5e2
Author: aagbsn <aagbsn@xxxxxxxx>
Date:   Thu Feb 28 14:14:13 2013 +0100

    Update tests to reflect change of syntax in NetTestLoader
---
 tests/test_director.py |    3 ++-
 tests/test_managers.py |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/test_director.py b/tests/test_director.py
index 484cb21..79a1e96 100644
--- a/tests/test_director.py
+++ b/tests/test_director.py
@@ -42,7 +42,8 @@ class TestDirector(unittest.TestCase):
         pass
 
     def test_start_net_test(self):
-        net_test_loader = NetTestLoader(net_test_string, dummyArgs)
+        options = {'test':net_test_string, 'subargs':dummyArgs}
+        net_test_loader = NetTestLoader(options)
         net_test_loader.checkOptions()
         d = self.director.startNetTest('', net_test_loader, self.reporters)
 
diff --git a/tests/test_managers.py b/tests/test_managers.py
index 601e305..39f0881 100644
--- a/tests/test_managers.py
+++ b/tests/test_managers.py
@@ -194,7 +194,7 @@ class TestMeasurementManager(unittest.TestCase):
         @mock_task.done.addCallback
         def done(res):
             self.assertEqual(self.mockNetTest.successes,
-                    [mock_task])
+                    [42])
 
             self.assertEqual(len(self.mockNetTest.successes), 1)
         return mock_task.done



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits