Force DummyServer to listen on IPv4
Ignore-this: 63465a1c491fb2438066f1f4bc303540 darcs-hash:20090630174050-86b55-65e864661db0bbc16ca3643455f776cd609f8488.gz
This commit is contained in:
@@ -48,7 +48,6 @@ if __name__ == '__main__':
|
|||||||
class MyTestProgram(unittest.TestProgram):
|
class MyTestProgram(unittest.TestProgram):
|
||||||
def runTests(self):
|
def runTests(self):
|
||||||
"""run tests but do not exit after"""
|
"""run tests but do not exit after"""
|
||||||
if self.testRunner is None:
|
|
||||||
self.testRunner = unittest.TextTestRunner(verbosity=self.verbosity)
|
self.testRunner = unittest.TextTestRunner(verbosity=self.verbosity)
|
||||||
self.testRunner.run(self.test)
|
self.testRunner.run(self.test)
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def xmldiff(node1, node2):
|
|||||||
|
|
||||||
class DummyServer:
|
class DummyServer:
|
||||||
def __init__(self, host, port, responses = None):
|
def __init__(self, host, port, responses = None):
|
||||||
for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE):
|
for res in socket.getaddrinfo(host, port, socket.AF_INET, socket.SOCK_STREAM, 0, socket.AI_PASSIVE):
|
||||||
af, socktype, proto, canonname, sa = res
|
af, socktype, proto, canonname, sa = res
|
||||||
try:
|
try:
|
||||||
s = socket.socket(af, socktype, proto)
|
s = socket.socket(af, socktype, proto)
|
||||||
@@ -203,5 +203,3 @@ def test():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
test()
|
test()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user