Commit d3fe73da authored by Denis Bilenko's avatar Denis Bilenko

add test__dns.py

parent 2a17f4e3
import greentest
import socket as real_socket
from gevent import socket
class TestHostname(greentest.TestCase):
switch_expected = False
def test_gethostbyname_hostname(self):
hostname = real_socket.gethostname()
real_ip = real_socket.gethostbyname(hostname)
ip = socket.gethostbyname(hostname)
assert real_ip == ip, (real_ip, ip)
if __name__=='__main__':
greentest.main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment