| 141 | |
| 142 | class UpdateTestCase(unittest.TestCase): |
| 143 | def test_to_wire1(self): # type: () -> None |
| 144 | update = dns.update.Update("example") |
| 145 | update.id = 1 |
| 146 | update.present("foo") |
| 147 | update.present("foo", "a") |
| 148 | update.present("bar", "a", "10.0.0.5") |
| 149 | update.absent("blaz2") |
| 150 | update.absent("blaz2", "a") |
| 151 | update.replace("foo", 300, "a", "10.0.0.1", "10.0.0.2") |
| 152 | update.add("bar", 300, "a", "10.0.0.3") |
| 153 | update.delete("bar", "a", "10.0.0.4") |
| 154 | update.delete("blaz", "a") |
| 155 | update.delete("blaz2") |
| 156 | self.assertEqual(update.to_wire(), goodwire) |
| 157 | |
| 158 | def test_to_wire2(self): # type: () -> None |
| 159 | update = dns.update.Update("example") |