Ejemplo n.º 1
0
    def test_should_fail_run_command(
            self, mock_sys_exit, mock_log_setup):
        mock_log_setup.side_effect = RuntimeError()

        retry_scheduler.main()

        self.assertEqual(1, mock_sys_exit.call_count)
Ejemplo n.º 2
0
    def test_should_launch_service(self, mock_periodic_server,
                                   mock_service_launch, mock_queue_init,
                                   mock_config):

        retry_scheduler.main()

        self.assertEqual(1, mock_queue_init.call_count)
        self.assertEqual(1, mock_service_launch.call_count)
        self.assertEqual(1, mock_periodic_server.call_count)
Ejemplo n.º 3
0
    def test_should_launch_service(
            self,
            mock_periodic_server,
            mock_service_launch,
            mock_queue_init,
            mock_config):

        retry_scheduler.main()

        self.assertEqual(1, mock_queue_init.call_count)
        self.assertEqual(1, mock_service_launch.call_count)
        self.assertEqual(1, mock_periodic_server.call_count)