twisted.internet.test.test_resolver.FakeAddrInfoGetter(object) class documentationtwisted.internet.test.test_resolver
(View In Hierarchy)
Test object implementing getaddrinfo.
| Method | __init__ | Create a FakeAddrInfoGetter. | 
| Method | getaddrinfo | Mock for socket.getaddrinfo. | 
| Method | addResultForHost | Add a result for a given hostname.  When this hostname is resolved, the 
result will be a listof all resultsaddResultForHosthas been called with using 
that hostname so far. | 
Mock for socket.getaddrinfo.
| Parameters | host | see socket.getaddrinfo | 
| port | see socket.getaddrinfo | |
| family | see socket.getaddrinfo | |
| socktype | see socket.getaddrinfo | |
| proto | see socket.getaddrinfo | |
| flags | see socket.getaddrinfo | |
| Returns | socket.getaddrinfo | |
Add a result for a given hostname.  When this hostname is resolved, the 
result will be a list
of all results addResultForHost has been called with using 
that hostname so far.
| Parameters | host | The hostname to give this result for.  This will be the next result from FakeAddrInfoGetter.getaddrinfowhen passed this host. | 
| sockaddr | The resulting socket address; should be a 2-tuple for IPv4 or a 4-tuple for IPv6. | |
| family | An AF_*constant that will be returned fromgetaddrinfo. | |
| socktype | A SOCK_*constant that will be returned fromgetaddrinfo. | |
| proto | An IPPROTO_*constant that will be returned fromgetaddrinfo. | |
| canonname | A canonical name that will be returned from getaddrinfo. (type: nativestr) |