[tor-commits] [ooni-probe/master] Merge branch 'master' into feature/improve_unittesting

art at torproject.org art at torproject.org
Fri Feb 28 14:32:21 UTC 2014


commit 0a921df80dace9756b9e5043611c0867e536e5c1
Merge: 6902a93 6d5cf42
Author: Arturo Filastò <art at fuffa.org>
Date:   Thu Jan 30 20:04:40 2014 +0100

    Merge branch 'master' into feature/improve_unittesting
    
    * master:
      Add tests for the oonib reporting API
      Fix the unittests for the oonibclient.
    
    Conflicts:
    	ooni/oonibclient.py

 ooni/oonibclient.py            |   12 +++++++++++-
 ooni/tests/test_nettest.py     |    1 -
 ooni/tests/test_oonibclient.py |   36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 2 deletions(-)

diff --cc ooni/oonibclient.py
index 6eff112,e257ef8..60771b6
--- a/ooni/oonibclient.py
+++ b/ooni/oonibclient.py
@@@ -54,10 -52,15 +55,16 @@@ class OONIBClient(object)
                  proxyEndpoint=TCP4ClientEndpoint(reactor, '127.0.0.1',
                      config.tor.socks_port))
  
 -        elif address.startswith('https://'):
 +        elif self.address.startswith('https://'):
              log.err("HTTPS based bouncers are currently not supported.")
 +            raise e.InvalidOONIBBouncerAddress
  
+         elif address.startswith('http://'):
+             log.msg("Warning using unencrypted collector")
+             self.address = address
+             self.agent = Agent(reactor)
+ 
+     def _request(self, method, urn, genReceiver, bodyProducer=None):
          attempts = 0
  
          finished = defer.Deferred()
diff --cc ooni/tests/test_nettest.py
index d965735,d965735..8833d27
--- a/ooni/tests/test_nettest.py
+++ b/ooni/tests/test_nettest.py
@@@ -16,7 -16,7 +16,6 @@@ from ooni.managers import TaskManage
  from ooni.tests.mocks import MockMeasurement, MockMeasurementFailOnce
  from ooni.tests.mocks import MockNetTest, MockDirector, MockReporter
  from ooni.tests.mocks import MockMeasurementManager
--defer.setDebugging(True)
  
  net_test_string = """
  from twisted.python import usage





More information about the tor-commits mailing list