MCPcopy Create free account
hub / github.com/rthalley/dnspython / testUseTransaction

Method testUseTransaction

tests/test_zone.py:1178–1193  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1176 zone_factory = dns.versioned.Zone
1177
1178 def testUseTransaction(self):
1179 z = dns.zone.from_text(
1180 example_text, "example.", relativize=True, zone_factory=self.zone_factory
1181 )
1182 with self.assertRaises(dns.versioned.UseTransaction):
1183 z.find_node("not_there", True)
1184 with self.assertRaises(dns.versioned.UseTransaction):
1185 z.delete_node("not_there")
1186 with self.assertRaises(dns.versioned.UseTransaction):
1187 z.find_rdataset("not_there", "a", create=True)
1188 with self.assertRaises(dns.versioned.UseTransaction):
1189 z.get_rdataset("not_there", "a", create=True)
1190 with self.assertRaises(dns.versioned.UseTransaction):
1191 z.delete_rdataset("not_there", "a")
1192 with self.assertRaises(dns.versioned.UseTransaction):
1193 z.replace_rdataset("not_there", None)
1194
1195 def testImmutableNodes(self):
1196 z = dns.zone.from_text(

Callers

nothing calls this directly

Calls 7

from_textMethod · 0.45
find_nodeMethod · 0.45
delete_nodeMethod · 0.45
find_rdatasetMethod · 0.45
get_rdatasetMethod · 0.45
delete_rdatasetMethod · 0.45
replace_rdatasetMethod · 0.45

Tested by

no test coverage detected