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

art at torproject.org art at torproject.org
Sat Mar 30 01:17:21 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 files changed, 11 insertions(+), 0 deletions(-)

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