MCPcopy Create free account
hub / github.com/rthalley/dnspython / test_going_backwards_fails

Method test_going_backwards_fails

tests/test_renderer.py:95–105  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93 self.assertEqual(message, expected)
94
95 def test_going_backwards_fails(self):
96 r = dns.renderer.Renderer(flags=dns.flags.QR, max_size=512)
97 qname = dns.name.from_text("foo.example")
98 r.add_question(qname, dns.rdatatype.A)
99 r.add_edns(0, 0, 4096)
100 rds = dns.rdataset.from_text("in", "a", 30, "10.0.0.1", "10.0.0.2")
101
102 def bad():
103 r.add_rdataset(dns.renderer.ANSWER, qname, rds)
104
105 self.assertRaises(dns.exception.FormError, bad)
106
107 def test_reservation(self):
108 r = dns.renderer.Renderer(flags=dns.flags.QR, max_size=512)

Callers

nothing calls this directly

Calls 3

add_questionMethod · 0.95
add_ednsMethod · 0.95
from_textMethod · 0.45

Tested by

no test coverage detected