[tor-commits] [ooni-probe/master] testDone is no longer called so we can remove it from unittests.

art at torproject.org art at torproject.org
Fri Oct 17 15:53:27 UTC 2014


commit 9cd1e8846864cce522b63067a821dccdb9f21bf3
Author: Arturo Filastò <art at fuffa.org>
Date:   Fri Oct 17 15:43:43 2014 +0200

    testDone is no longer called so we can remove it from unittests.
---
 ooni/tests/test_reporter.py |   10 ----------
 1 file changed, 10 deletions(-)

diff --git a/ooni/tests/test_reporter.py b/ooni/tests/test_reporter.py
index 9aae88c..64b3623 100644
--- a/ooni/tests/test_reporter.py
+++ b/ooni/tests/test_reporter.py
@@ -49,11 +49,8 @@ class TestYAMLReporter(unittest.TestCase):
             os.remove(self.filename)
 
     def test_write_report(self):
-        test = MockTest()
-
         y_reporter = YAMLReporter(test_details)
         y_reporter.createReport()
-        y_reporter.testDone(test, 'spam')
         with open(y_reporter.report_path) as f:
             self.filename = y_reporter.report_path
             report_entries = yaml.safe_load_all(f)
@@ -61,13 +58,6 @@ class TestYAMLReporter(unittest.TestCase):
             entry = report_entries.next()
             assert all(x in entry for x in ['test_name', 'test_version'])
 
-            entry = report_entries.next()
-            # Check for first entry of report
-            assert all(x in entry
-                       for x in ['report_content', 'input',
-                                 'test_name', 'test_started',
-                                 'test_runtime'])
-
 
 class TestOONIBReporter(unittest.TestCase):
 





More information about the tor-commits mailing list