(self)
| 162 | self.assertEqual(str(m), query_text_2) |
| 163 | |
| 164 | def test_EDNS_options_wire(self): |
| 165 | m = dns.message.make_query("foo", "A") |
| 166 | opt = dns.edns.GenericOption(3, b"data") |
| 167 | m.use_edns(options=[opt]) |
| 168 | m2 = dns.message.from_wire(m.to_wire()) |
| 169 | self.assertEqual(m2.edns, 0) |
| 170 | self.assertEqual(len(m2.options), 1) |
| 171 | self.assertEqual(m2.options[0], opt) |
| 172 | |
| 173 | def test_keeping_wire(self): |
| 174 | m = dns.message.from_wire(goodwire) |