def METHOD_NAME(test_client, db_session, auth_headers):
    batch_size = 5
    mpas = MinePartyAppointmentFactory.create_batch(
        size=batch_size, mine_party_appt_type_code='MMG')
    parties = [mpa.party for mpa in mpas]
    party_guids = [str(party.party_guid) for party in parties]
    party = PARTY
    payload = {'party_guids': party_guids, 'party': party}
    post_resp = test_client.post(
        '/parties/merge',
        data=json.dumps(payload),
        content_type='application/json',
        headers=auth_headers['full_auth_header'])
    assert post_resp.status_code == 200
    post_data = json.loads(post_resp.data.decode())
    merged_party_guid = post_data['party_guid']
    merged_party = Party.find_by_party_guid(merged_party_guid)
    assert merged_party
    for key in party.keys():
        if key == 'address':
            for key2 in party[key].keys():
                assert party[key][key2] == post_data[key][0][key2]
        else:
            assert party[key] == post_data[key]
    for party_guid in party_guids:
        party = Party.query.filter_by(party_guid=party_guid).one()
        assert party.deleted_ind
        assert str(party.merged_party_guid) == merged_party_guid
        for address in party.address:
            assert address.deleted_ind
    for npa in merged_party.now_party_appt:
        assert str(npa.party_guid) == merged_party_guid
        assert npa.merged_from_party_guid
    for mpa in merged_party.mine_party_appt:
        assert str(mpa.party_guid) == merged_party_guid
        assert mpa.merged_from_party_guid
    for bra in merged_party.business_role_appts:
        assert str(bra.party_guid) == merged_party_guid
        assert bra.merged_from_party_guid