test_logging_config.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:incubator-airflow-old 作者: apache 项目源码 文件源码
def test_when_the_config_key_does_not_exists(self):
        from airflow import logging_config

        def side_effect(*args):
            if args[1] == 'logging_config_class':
                raise AirflowConfigException
            else:
                return "bla_bla_from_test"

        logging_config.conf.get = mock.Mock(side_effect=side_effect)

        with patch.object(logging_config.log, 'debug') as mock_debug:
            logging_config.configure_logging()
            mock_debug.assert_any_call('Could not find key logging_config_class in config')

    # Just default
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号