[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Change test for setupCollector() function
commit 8fd571f03319462babc1ca925cb147498d28f138
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date: Wed May 18 16:10:07 2016 +0200
Change test for setupCollector() function
---
ooni/tests/test_oonicli.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ooni/tests/test_oonicli.py b/ooni/tests/test_oonicli.py
index 24877e8..4a58736 100644
--- a/ooni/tests/test_oonicli.py
+++ b/ooni/tests/test_oonicli.py
@@ -221,5 +221,11 @@ class TestOoniCli(ConfigTestCase):
global_options = {
'collector': collector1
}
- collector_address = setupCollector(global_options, collector2)
- self.assertEqual(collector_address, collector1)
+ try:
+ collector_client = setupCollector(global_options, collector2)
+ self.assertEqual(collector_client.settings['address'], collector1)
+ self.assertEqual(collector_client.settings['type'], 'https')
+ except errors.CollectorUnsupported:
+ # Older versions of twisted will raise this. We could be more
+ # strict and do a check for older twisted versions in here.
+ pass
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits