示例#1
0
 def test_stopService_calls_unregister_on_the_listener(self):
     listener = MagicMock()
     service = RegionControllerService(listener)
     service.stopService()
     self.assertThat(
         listener.unregister,
         MockCallsMatch(call("sys_dns", service.markDNSForUpdate),
                        call("sys_proxy", service.markProxyForUpdate)))
示例#2
0
 def test_stopService_handles_canceling_processing(self):
     listener = MagicMock()
     service = RegionControllerService(listener)
     service.startProcessing()
     yield service.stopService()
     self.assertIsNone(service.processingDefer)