| 171 | self.assertEqual(update.to_wire(), goodwire) |
| 172 | |
| 173 | def test_to_wire3(self): # type: () -> None |
| 174 | update = dns.update.Update("example") |
| 175 | update.id = 1 |
| 176 | update.present("foo") |
| 177 | update.present("foo", "a") |
| 178 | update.present("bar", "a", "10.0.0.5") |
| 179 | update.absent("blaz2") |
| 180 | update.absent("blaz2", "a") |
| 181 | update.replace("foo", 300, "a", "10.0.0.1", "10.0.0.2") |
| 182 | update.add("bar", dns.rdataset.from_text(1, 1, 300, "10.0.0.3")) |
| 183 | update.delete("bar", "a", "10.0.0.4") |
| 184 | update.delete("blaz", "a") |
| 185 | update.delete("blaz2") |
| 186 | self.assertEqual(update.to_wire(), goodwire) |
| 187 | |
| 188 | def test_from_text1(self): # type: () -> None |
| 189 | update = dns.message.from_text(update_text) |