test_client.py 文件源码

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

项目:pyoozie 作者: Shopify 项目源码 文件源码
def test_admin_list_sharelib(self, api):
        reply = {
            'sharelib': [
                {'name': 'oozie'},
                {'name': 'hive'},
                {'name': 'distcp'},
                {'name': 'hcatalog'},
                {'name': 'sqoop'},
                {'name': 'mapreduce-streaming'},
                {'name': 'spark'},
                {'name': 'hive2'},
                {'name': 'pig'}
            ]
        }
        expected = ['oozie', 'hive', 'distcp', 'hcatalog', 'sqoop', 'mapreduce-streaming', 'spark', 'hive2', 'pig']
        with mock.patch.object(api, '_get', return_value=reply) as mock_get:
            assert api.admin_list_sharelib() == expected
            mock_get.assert_called_with('admin/list_sharelib')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号