If the result was NXDOMAIN or NXRRSET, and there are rrs in the
additions buffer, the result is changed to SUCCESS.
'''
+ if not self.__single_update_mode:
+ raise ValueError("find_updated() can only be used in " +
+ "single-update mode")
result, rrset, flags = self.find(name, rrtype)
added_rrs = self.__get_name_type_from_additions(name, rrtype)
If the result was NXDOMAIN, and there are rrs in the additions buffer,
the result is changed to SUCCESS.
'''
+ if not self.__single_update_mode:
+ raise ValueError("find_all_updated can only be used in " +
+ "single-update mode")
result, rrsets, flags = self.find_all(name)
new_rrsets = []
added_rrs = self.__get_name_from_additions(name)
self.assertRaises(ValueError, diff_single.get_buffer)
self.assertEqual(([], []), diff_single.get_single_update_buffers())
+ def test_finds_single(self):
+ '''
+ Test that find_updated() and find_all_updated() can only be used
+ in single-update-mode.
+ '''
+ diff_multi = Diff(self, Name('example.org.'), single_update_mode=False)
+ self.assertRaises(ValueError, diff_multi.find_updated,
+ Name('example.org.'), RRType.A())
+ self.assertRaises(ValueError, diff_multi.find_all_updated,
+ Name('example.org.'))
+
def test_single_update_mode(self):
'''
Test single-update mode. In this mode, updates and deletes can