summaryrefslogtreecommitdiffstats
path: root/netaddr/tests/ip/test_dns.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 17:45:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 17:45:09 +0000
commitda1a8f12d7a38f67f3f464aaaffa851f929ae4ea (patch)
tree677688f3aeab7f324f266d106770165708522c2c /netaddr/tests/ip/test_dns.py
parentInitial commit. (diff)
downloadpython-netaddr-upstream.tar.xz
python-netaddr-upstream.zip
Adding upstream version 0.10.1.upstream/0.10.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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.')