示例#1
0
 def test_startService_calls_markDNSForUpdate(self):
     listener = MagicMock()
     service = RegionControllerService(listener)
     mock_markDNSForUpdate = self.patch(service, "markDNSForUpdate")
     service.startService()
     yield service.processingDefer
     self.assertThat(mock_markDNSForUpdate, MockCalledOnceWith(None, None))
示例#2
0
 def test_startService_registers_with_postgres_listener(self):
     listener = MagicMock()
     service = RegionControllerService(listener)
     service.startService()
     yield service.processingDefer
     self.assertThat(
         listener.register,
         MockCallsMatch(call("sys_dns", service.markDNSForUpdate),
                        call("sys_proxy", service.markProxyForUpdate)))