bootstrapper_test.py 文件源码

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

项目:data_pipeline 作者: Yelp 项目源码 文件源码
def test_bootstrap_files_calls_register_file_for_each_file(
            self,
            containers
    ):
        file_paths = {'a.test', 'b.test'}
        bootstrapper = FileBootstrapperBase(
            schema_ref=None,
            file_paths=file_paths,
            override_metadata=True,
            file_extension='test'
        )
        bootstrapper.register_file = mock.Mock(return_value=None)
        bootstrapper.bootstrap_schema_result = mock.Mock()
        bootstrapper.bootstrap_files()
        assert bootstrapper.register_file.mock_calls == [
            mock.call(file_path) for file_path in file_paths
        ]
        assert bootstrapper.bootstrap_schema_result.mock_calls == [
            mock.call(None) for _ in file_paths
        ]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号