[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Add an example test that inherits from the HTTP and DNS test template
commit 0c99be6979ace45d9d46758aa9c1e1741fbb69b9
Author: Arturo Filastò <art@xxxxxxxxx>
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))
+
+
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits