diff options
| author | Bob Halley <halley@dnspython.org> | 2022-03-12 14:40:27 -0800 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2022-03-12 14:40:27 -0800 |
| commit | 08f8bde64e8679d5e4f0b129292461de152ba32b (patch) | |
| tree | 589e0b4c0a4362c9dd4b47bc2dc42c43a6b70492 /tests | |
| parent | 19ed6999b8829b0b406f29bf7dacaa574313feda (diff) | |
| download | dnspython-08f8bde64e8679d5e4f0b129292461de152ba32b.tar.gz | |
test versioned zone non-txn get of nonexistent set
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_zone.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_zone.py b/tests/test_zone.py index 7f3bf13..b7046b2 100644 --- a/tests/test_zone.py +++ b/tests/test_zone.py @@ -1096,6 +1096,19 @@ class VersionedZoneTestCase(unittest.TestCase): with self.assertRaises(dns.zone.NoSOA): soa = z.get_soa() + def testGetRdataset1(self): + z = dns.zone.from_text(example_text, 'example.', relativize=True, + zone_factory=dns.versioned.Zone) + rds = z.get_rdataset('@', 'soa') + exrds = dns.rdataset.from_text('IN', 'SOA', 300, 'foo bar 1 2 3 4 5') + self.assertEqual(rds, exrds) + + def testGetRdataset2(self): + z = dns.zone.from_text(example_text, 'example.', relativize=True, + zone_factory=dns.versioned.Zone) + rds = z.get_rdataset('@', 'loc') + self.assertTrue(rds is None) + if __name__ == '__main__': unittest.main() |
