commit 8a6e1a50fc5aa6fc9726b111c9edc9f44008f921 Author: Arturo Filastò arturo@filasto.net Date: Thu May 5 19:30:29 2016 +0200
Fix some issues with the rebase --- ooni/nettest.py | 2 -- ooni/reporter.py | 6 +++--- ooni/tests/test_nettest.py | 9 ++------- 3 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/ooni/nettest.py b/ooni/nettest.py index 67d3e27..8b9556e 100644 --- a/ooni/nettest.py +++ b/ooni/nettest.py @@ -572,8 +572,6 @@ class NetTest(object): test_class.inputs = yield defer.maybeDeferred( test_class().getInputProcessor ) - if not test_class.inputs: - test_class.inputs = [None]
# Run the setupClass method yield defer.maybeDeferred( diff --git a/ooni/reporter.py b/ooni/reporter.py index aa6f5ee..6103c1e 100644 --- a/ooni/reporter.py +++ b/ooni/reporter.py @@ -646,12 +646,12 @@ class Report(object): created callback of the reporter whose report got created. """ if self.collector_address: - self.oonib_reporter = OONIBReporter(self.net_test_details, + self.oonib_reporter = OONIBReporter(self.test_details, self.collector_address) - self.net_test_details['report_id'] = yield self.open_oonib_reporter() + self.test_details['report_id'] = yield self.open_oonib_reporter()
if not self.no_yamloo: - self.yaml_reporter = YAMLReporter(self.net_test_details, + self.yaml_reporter = YAMLReporter(self.test_details, report_filename=self.report_filename) self.report_filename = self.yaml_reporter.report_path if not self.oonib_reporter: diff --git a/ooni/tests/test_nettest.py b/ooni/tests/test_nettest.py index 660fd3e..da4969f 100644 --- a/ooni/tests/test_nettest.py +++ b/ooni/tests/test_nettest.py @@ -261,13 +261,8 @@ class TestNetTest(unittest.TestCase): nt = NetTest(ntl.getTestCases(), ntl.getTestDetails(), None) yield nt.initialize()
- # XXX: if you use the same test_class twice you will have consumed all - # of its inputs! - tested = set([]) - for test_class, test_method in ntl.getTestCases(): - if test_class not in tested: - tested.update([test_class]) - self.assertEqual(len(list(test_class.inputs)), 10) + for test_class, test_methods in nt.testCases: + self.assertEqual(len(list(test_class.inputs)), 10)
def test_setup_local_options_in_test_cases(self): ntl = NetTestLoader(dummyArgs)
tor-commits@lists.torproject.org