[Python-modules-commits] [python-eventlet] 09/19: Patched test_getaddrinfo due netbase update
Thomas Goirand
zigo at moszumanska.debian.org
Tue Nov 14 21:39:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
zigo pushed a commit to branch master
in repository python-eventlet.
commit d344d2b3587c669e087dc9169822c6c34e488886
Author: Ondřej Kobližek <koblizeko at gmail.com>
Date: Fri Aug 4 21:47:22 2017 +0200
Patched test_getaddrinfo due netbase update
Asserting udp for ssh introduce test failures with netbase 5.4
because removed ssh (22/udp).
This fix changes ssh -> domain, which better suit for test name and
allows tcp and udp simultaneously.
Forwarded: https://github.com/eventlet/eventlet/pull/375
---
tests/greendns_test.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tests/greendns_test.py b/tests/greendns_test.py
index cf17999..6ffc28f 100644
--- a/tests/greendns_test.py
+++ b/tests/greendns_test.py
@@ -458,11 +458,11 @@ class TestGetaddrinfo(tests.LimitedTestCase):
greendns.resolve = _make_mock_resolve()
greendns.resolve.add('example.com', '127.0.0.2')
greendns.resolve.add('example.com', '::1')
- res = greendns.getaddrinfo('example.com', 'ssh')
- addr = ('127.0.0.2', 22)
+ res = greendns.getaddrinfo('example.com', 'domain')
+ addr = ('127.0.0.2', 53)
tcp = (socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP, addr)
udp = (socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP, addr)
- addr = ('::1', 22, 0, 0)
+ addr = ('::1', 53, 0, 0)
tcp6 = (socket.AF_INET6, socket.SOCK_STREAM, socket.IPPROTO_TCP, addr)
udp6 = (socket.AF_INET6, socket.SOCK_DGRAM, socket.IPPROTO_UDP, addr)
filt_res = [ai[:3] + (ai[4],) for ai in res]
@@ -475,8 +475,8 @@ class TestGetaddrinfo(tests.LimitedTestCase):
greendns.resolve = _make_mock_resolve()
idn_name = u'евентлет.com'
greendns.resolve.add(idn_name.encode('idna').decode('ascii'), '127.0.0.2')
- res = greendns.getaddrinfo(idn_name, 'ssh')
- addr = ('127.0.0.2', 22)
+ res = greendns.getaddrinfo(idn_name, 'domain')
+ addr = ('127.0.0.2', 53)
tcp = (socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP, addr)
udp = (socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP, addr)
filt_res = [ai[:3] + (ai[4],) for ai in res]
@@ -486,8 +486,8 @@ class TestGetaddrinfo(tests.LimitedTestCase):
def test_getaddrinfo_inet(self):
greendns.resolve = _make_mock_resolve()
greendns.resolve.add('example.com', '127.0.0.2')
- res = greendns.getaddrinfo('example.com', 'ssh', socket.AF_INET)
- addr = ('127.0.0.2', 22)
+ res = greendns.getaddrinfo('example.com', 'domain', socket.AF_INET)
+ addr = ('127.0.0.2', 53)
tcp = (socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP, addr)
udp = (socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP, addr)
assert tcp in [ai[:3] + (ai[4],) for ai in res]
@@ -496,8 +496,8 @@ class TestGetaddrinfo(tests.LimitedTestCase):
def test_getaddrinfo_inet6(self):
greendns.resolve = _make_mock_resolve()
greendns.resolve.add('example.com', '::1')
- res = greendns.getaddrinfo('example.com', 'ssh', socket.AF_INET6)
- addr = ('::1', 22, 0, 0)
+ res = greendns.getaddrinfo('example.com', 'domain', socket.AF_INET6)
+ addr = ('::1', 53, 0, 0)
tcp = (socket.AF_INET6, socket.SOCK_STREAM, socket.IPPROTO_TCP, addr)
udp = (socket.AF_INET6, socket.SOCK_DGRAM, socket.IPPROTO_UDP, addr)
assert tcp in [ai[:3] + (ai[4],) for ai in res]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-eventlet.git
More information about the Python-modules-commits
mailing list