blob: 6b38c5867bb730050947f1d16b7ae1d1256a9cc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
--- unit_tests/test_twisted.py.orig 2007-05-10 19:11:17.000000000 +0300
+++ unit_tests/test_twisted.py 2007-10-11 09:23:05.000000000 +0300
@@ -13,31 +13,6 @@
class CustomError(Exception):
pass
-# FIXME move all dns-using tests to functional
-
-# Should succeed unless google is down
-#@deferred
-def test_resolve():
- return reactor.resolve("www.google.com")
-test_resolve = deferred()(test_resolve)
-
-# Raises TypeError because the function does not return a Deferred
-#@raises(TypeError)
-#@deferred()
-def test_raises_bad_return():
- print reactor
- reactor.resolve("nose.python-hosting.com")
-test_raises_bad_return = raises(TypeError)(deferred()(test_raises_bad_return))
-
-# Check we propagate twisted Failures as Exceptions
-# (XXX this test might take some time: find something better?)
-#@raises(DNSLookupError)
-#@deferred()
-def test_raises_twisted_error():
- return reactor.resolve("x.y.z")
-test_raises_twisted_error = raises(DNSLookupError)(
- deferred()(test_raises_twisted_error))
-
# Check we detect Exceptions inside the callback chain
#@raises(CustomError)
#@deferred(timeout=1.0)
|