[tor-commits] [ooni-probe/develop] Add an example test that inherits from the HTTP and DNS test template

isis at torproject.org isis at torproject.org
Thu Jun 6 16:41:36 UTC 2013


commit 0c99be6979ace45d9d46758aa9c1e1741fbb69b9
Author: Arturo Filastò <art at fuffa.org>
Date:   Tue Feb 26 23:34:01 2013 +0100

    Add an example test that inherits from the HTTP and DNS test template
---
 nettests/examples/example_dns_http.py |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/nettests/examples/example_dns_http.py b/nettests/examples/example_dns_http.py
new file mode 100644
index 0000000..9b76775
--- /dev/null
+++ b/nettests/examples/example_dns_http.py
@@ -0,0 +1,11 @@
+from twisted.internet import defer
+from ooni.templates import httpt, dnst
+
+class TestDNSandHTTP(httpt.HTTPTest, dnst.DNSTest):
+
+    @defer.inlineCallbacks
+    def test_http_and_dns(self):
+        yield self.doRequest('http://torproject.org')
+        yield self.performALookup('torproject.org', ('8.8.8.8', 53))
+
+





More information about the tor-commits mailing list