The dns.query Python module has the send_tcp() method defined in both dnspython 1.x and 2.x, so checking for the existence of that method to determine the dnspython version available in the test environment does not make any sense. Fix by checking the dns.version.MAJOR integer instead.