(zone)
| 572 | |
| 573 | |
| 574 | def test_replacement_commit(zone): |
| 575 | rds = dns.rdataset.from_text("in", "a", 300, "1.2.3.4", "5.6.7.8") |
| 576 | expected = {} |
| 577 | expected[(dns.name.empty, rds.rdtype, rds.covers)] = rds |
| 578 | with zone.writer(True) as txn: |
| 579 | txn.replace(dns.name.empty, rds) |
| 580 | with zone.reader() as txn: |
| 581 | actual = {} |
| 582 | for name, rdataset in txn: |
| 583 | actual[(name, rdataset.rdtype, rdataset.covers)] = rdataset |
| 584 | assert actual == expected |
| 585 | |
| 586 | |
| 587 | def test_replacement_get(zone): |