summaryrefslogtreecommitdiffstats
path: root/netaddr/tests/ip/test_dns.py
diff options
context:
space:
mode:
Diffstat (limited to 'netaddr/tests/ip/test_dns.py')
-rw-r--r--netaddr/tests/ip/test_dns.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/netaddr/tests/ip/test_dns.py b/netaddr/tests/ip/test_dns.py
new file mode 100644
index 0000000..700fb66
--- /dev/null
+++ b/netaddr/tests/ip/test_dns.py
@@ -0,0 +1,11 @@
+from netaddr import IPAddress
+
+
+def test_reverse_dns_v4():
+ assert IPAddress('172.24.0.13').reverse_dns == '13.0.24.172.in-addr.arpa.'
+
+
+def test_reverse_dns_v6():
+ assert IPAddress('fe80::feeb:daed').reverse_dns == ('d.e.a.d.b.e.e.f.0.0.0.0.0.0.0.0.'
+ '0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.'
+ 'ip6.arpa.')