def test_fill_city_2(monkeypatch):
    pca = Pca('', '', '朝阳区')
    mo_map = mock_map(monkeypatch, 'area_map', '北京市')
    cpca._fill_city(pca, {})

    mo_map.get_value.assert_called_once_with(pca.area, C)
    assert pca.city == '北京市'
def test_fill_city_3(monkeypatch):
    pca = Pca('江苏省', '', '鼓楼区')
    mock_map(monkeypatch,
             'area_map',
             '',
             is_contain=True,
             is_unique_value=False)
    mo_map = mock_map(monkeypatch, 'province_area_map', '南京市')
    cpca._fill_city(pca, {})

    mo_map.get_value.assert_called_once_with(('江苏省', '鼓楼区'), C)
    assert pca.city == '南京市'
def test_fill_city_1():
    pca = Pca('', '', '朝阳区')
    cpca._fill_city(pca, {'朝阳区': '北京市'})
    assert pca.city == '北京市'