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))
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)))