@mock.patch('mutornadomon.config.MuTornadoMon')
    @mock.patch('mutornadomon.config.WebCollector')
    @mock.patch('mutornadomon.config.UtilizationCollector')
    def test_initialize_mutornadmon_passes_publisher(
        self,
        utilization_collector_mock,
        web_collector_mock,
        mutornadomon_mock
    ):

        def publisher(monitor):
            pass

        app = sentinel.application
        result = initialize_mutornadomon(app,
                                         publisher=publisher,
                                         host_limit='test')
        monitor_inst = mutornadomon_mock.return_value

        # initialize_mutornadomon() should return the monitor instance
        self.assertEqual(result, monitor_inst)

        web_collector_mock.assert_called_once_with(monitor_inst, app)
        utilization_collector_mock.assert_called_once_with(monitor_inst)

        assert mutornadomon_mock.call_count == 1
        arg_list = mutornadomon_mock.call_args_list

        args, kwargs = arg_list[0]
        self.assertEqual(len(args), 1)
        self.assertTrue(isinstance(args[0], PublishExternalInterface))

        self.assertEqual(kwargs, {})
Recursively convert Lua ``obj`` to Python objects.
dataset/ETHPy150Open uber/mutornadomon/tests/test_config.py/TestInitializeMutornadomon.test_initialize_mutornadmon_passes_publisher--crossover with--dataset/ETHPy150Open scrapinghub/splash/splash/lua.py/lua2python