Esempio n. 1
0
    def test_find_zone_serial_error(self):
        self.backend._dnsutils.get_zone_serial.side_effect = (
            os_win_exc.DNSZoneNotFound(zone_name=self.zone_name))

        serial = self.backend.find_zone_serial(self.zone_name)

        self.assertIsNone(serial)
        self.backend._dnsutils.get_zone_serial.assert_called_once_with(
            self.zone_name)
Esempio n. 2
0
 def _get_zone(self, zone_name, ignore_missing=True):
     zones = self._dns_manager.MicrosoftDNS_Zone(Name=zone_name)
     if zones:
         return zones[0]
     if not ignore_missing:
         raise exceptions.DNSZoneNotFound(zone_name=zone_name)