[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Adapt unittests to changes in the reporting



commit 54529569c99ba670ff1135a3219de0ae19186d40
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Sat Jan 30 22:24:51 2016 +0100

    Adapt unittests to changes in the reporting
---
 ooni/tests/test_reporter.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ooni/tests/test_reporter.py b/ooni/tests/test_reporter.py
index 454fbef..f1f7c3a 100644
--- a/ooni/tests/test_reporter.py
+++ b/ooni/tests/test_reporter.py
@@ -25,11 +25,12 @@ test_details = {
     'software_version': '1.0',
     'input_hashes': [],
     'probe_asn': 'AS0',
+    'probe_cc': 'ZZ',
     'start_time': time.time()
 }
 
 oonib_new_report_message = {
-    'report_id': "2014-01-29T202038Z_AS0_" + "A" * 50,
+    'report_id': "20140129T202038Z_AS0_" + "A" * 50,
     'backend_version': "1.0"
 }
 
@@ -94,6 +95,8 @@ class TestOONIBReporter(unittest.TestCase):
 
     @defer.inlineCallbacks
     def test_write_report_entry(self):
+        self.mock_response = oonib_new_report_message
+        yield self.oonib_reporter.createReport()
         req = {'content': 'something'}
         yield self.oonib_reporter.writeReportEntry(req)
         assert self.oonib_reporter.agent.request.called



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits