summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Shepelev <temotor@gmail.com>2018-05-14 02:49:24 +0300
committerSergey Shepelev <temotor@gmail.com>2018-05-14 02:49:24 +0300
commit0ae84185cb82aa1c869c57ccccf4d6aef117c8b5 (patch)
tree21556f4533c9d2073c5a7e00968e07a5e9e7ef28
parent53b63c66f0d9a7d6ba9182a207529ebd949e95f3 (diff)
downloadeventlet-490-import-dns.tar.gz
test for https://github.com/eventlet/eventlet/issues/479490-import-dns
-rw-r--r--tests/greendns_test.py5
-rw-r--r--tests/isolated/greendns_import_rdtypes_then_eventlet.py8
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/greendns_test.py b/tests/greendns_test.py
index e245727..7c65afb 100644
--- a/tests/greendns_test.py
+++ b/tests/greendns_test.py
@@ -849,3 +849,8 @@ def test_hosts_priority():
rrs6 = greendns.resolve(name, family=socket.AF_INET6, _proxy=rp).rrset
assert len(rrs6) == 1
assert rrs6[0].address == 'dead:beef::1', rrs6[0].address
+
+
+def test_import_rdtypes_then_eventlet():
+ # https://github.com/eventlet/eventlet/issues/479
+ tests.run_isolated('greendns_import_rdtypes_then_eventlet.py')
diff --git a/tests/isolated/greendns_import_rdtypes_then_eventlet.py b/tests/isolated/greendns_import_rdtypes_then_eventlet.py
new file mode 100644
index 0000000..1821b80
--- /dev/null
+++ b/tests/isolated/greendns_import_rdtypes_then_eventlet.py
@@ -0,0 +1,8 @@
+__test__ = False
+
+if __name__ == '__main__':
+ import dns.rdtypes
+ import eventlet.support.greendns
+ # AttributeError: 'module' object has no attribute 'dnskeybase'
+ # https://github.com/eventlet/eventlet/issues/479
+ print('pass')