test_views.py 文件源码

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

项目:directory-ui-buyer 作者: uktrade 项目源码 文件源码
def test_supplier_sectors_edit_standalone_view_api_success(
    mock_update_profile, has_company_client,
    company_profile_sectors_standalone_data,
    api_response_200,
    sso_user,
):
    mock_update_profile.return_value = api_response_200

    url = reverse('company-edit-sectors')
    has_company_client.post(url, company_profile_sectors_standalone_data)
    assert mock_update_profile.call_count == 1
    assert mock_update_profile.call_args == call(
        sso_session_id=sso_user.session_id,
        data={
            'sectors': ['AGRICULTURE_HORTICULTURE_AND_FISHERIES'],
            'export_destinations': ['CN', 'IN'],
            'export_destinations_other': 'West Philadelphia',
        }
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号