def setUp(self): self.context = mock.Mock() self.pool = mock.Mock() self.zone = mock.Mock(name='example.com.', serial=1) self.threshold = 80 self.executor = mock.Mock() self.poller = zone.ZonePoller( self.executor, self.context, self.pool, self.zone, ) self.poller._threshold = self.threshold
def setUp(self): self.executor = processing.Executor() self.context = mock.Mock() self.zone = mock.Mock(name='example.com.', action='UPDATE', serial=10) self.pool = mock.Mock(nameservers=['ns1', 'ns2']) self.threshold = 80 self.poller = zone.ZonePoller( self.executor, self.context, self.pool, self.zone, ) self.max_retries = 4 self.retry_interval = 2 self.poller._max_retries = self.max_retries self.poller._retry_interval = self.retry_interval