-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mock dns responses to make running tests easier and more efficient
By monkeypatching socket.getaddrinfo() in a couple of places, the requirement to add entries to the hosts file (which usually requires root access) is removed. It also avoid long timeouts in dual-stack IPv4/IPv6 environments where the tests try to connect to the IPv6 address for localhost first, but the test service is only listening on the IPv4 address. Also update test_alternate_hosts() to wait for a successful connection, and fix a logic error in StubStompServer where get_next_frame() was returning an empty string but the caller was testing for None.
- Loading branch information
1 parent
0fbc095
commit 2cb5d2e
Showing
5 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters