[tor-commits] [ooni-probe/master] Update DNS Test example to not import the DNS Test template

art at torproject.org art at torproject.org
Tue Dec 25 00:07:16 UTC 2012


commit c2abe625e3c87d828cfa6e053cd63dd3d8d3dd4e
Author: Arturo Filastò <art at fuffa.org>
Date:   Tue Dec 25 01:01:08 2012 +0100

    Update DNS Test example to not import the DNS Test template
    If you import the DNS Test template it will be considered a valid test case and
    command line argument parsing will not work as expected.
    see: https://trac.torproject.org/projects/tor/ticket/7795 for more details
---
 nettests/examples/example_dnst.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/nettests/examples/example_dnst.py b/nettests/examples/example_dnst.py
index b06e9af..6905637 100644
--- a/nettests/examples/example_dnst.py
+++ b/nettests/examples/example_dnst.py
@@ -1,6 +1,8 @@
-from ooni.templates.dnst import DNSTest
+from ooni.templates import dnst
+
+class ExampleDNSTest(dnst.DNSTest):
+    inputFile = ['file', 'f', None, 'foobar']
 
-class ExampleDNSTest(DNSTest):
     def test_a_lookup(self):
         def gotResult(result):
             # Result is an array containing all the A record lookup results



More information about the tor-commits mailing list