[tor-commits] [ooni-probe/master] Change test for setupCollector() function
art at torproject.org
art at torproject.org
Mon May 30 16:28:33 UTC 2016
commit 8fd571f03319462babc1ca925cb147498d28f138
Author: Arturo Filastò <arturo at filasto.net>
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
More information about the tor-commits
mailing list