[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Call setupBaseAddress after setting the settings
commit bec21d9ab32e5dbbbde7927dc1bb572742ebb24c
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date: Tue Jun 21 18:00:41 2016 +0200
Call setupBaseAddress after setting the settings
This makes it possible to re-instantiate a BackendClient from the settings
---
ooni/backend_client.py | 2 +-
ooni/tests/test_deck.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ooni/backend_client.py b/ooni/backend_client.py
index 83869cc..506aba4 100644
--- a/ooni/backend_client.py
+++ b/ooni/backend_client.py
@@ -42,12 +42,12 @@ class OONIBClient(object):
self.backend_type = guess_backend_type(self.base_address)
self.backend_type = self.backend_type.encode('ascii')
- self._setupBaseAddress()
self.settings = {
'type': self.backend_type,
'address': self.base_address,
'front': self.front
}
+ self._setupBaseAddress()
def _setupBaseAddress(self):
parsed_address = urlparse(self.base_address)
diff --git a/ooni/tests/test_deck.py b/ooni/tests/test_deck.py
index f299e70..ba87ec8 100644
--- a/ooni/tests/test_deck.py
+++ b/ooni/tests/test_deck.py
@@ -185,7 +185,7 @@ class TestDeck(BaseTestCase, ConfigTestCase):
yield deck.lookupCollectorAndTestHelpers()
self.assertEqual(deck.netTestLoaders[0].collector.settings['address'],
- 'http://thirteenchars123.onion')
+ 'httpo://thirteenchars123.onion')
self.assertEqual(deck.netTestLoaders[0].localOptions['backend'],
'127.0.0.1')
@@ -237,7 +237,7 @@ class TestDeck(BaseTestCase, ConfigTestCase):
)
self.assertEqual(
deck.netTestLoaders[0].collector.settings['front'],
- 'https://front.cloudfront.net'
+ 'front.cloudfront.net'
)
self.assertEqual(
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits