def test_list_update_member_and_member_info():
    # set up
    assert chimp.list_subscribe(list_id(), EMAIL_ADDRESS,
                                    {'FIRST': 'unit', 'LAST': 'tests'},
                                    double_optin=False)
    assert chimp.list_merge_var_add(list_id(), 'TEST', 'test_merge_var')
    grouping_id = chimp.list_interest_groupings_add(list_id(), 'tlistg', 'hidden', ['tlist'])


    # update member and get the info back
    assert chimp.list_update_member(list_id(), EMAIL_ADDRESS,
                                    {'TEST': 'abc',
                                    'INTERESTS': 'tlist'}, replace_interests=False)
    info = chimp.list_member_info(list_id(), EMAIL_ADDRESS)
    pprint.pprint(info)

    # tear down
    assert chimp.list_merge_var_del(list_id(), 'TEST')
    assert chimp.list_interest_group_del(list_id(), 'tlist', grouping_id)
    assert chimp.list_interest_groupings_del(grouping_id)
    assert chimp.list_unsubscribe(list_id(), EMAIL_ADDRESS,
                                    delete_member=True,
                                    send_goodbye=False,
                                    send_notify=False)

    # check the info matches the set up
    assert info['merges'] in 'TEST'
    assert info['merges']['TEST'] == 'abc'
dataset/ETHPy150Open divio/django-mailchimp/mailchimp/chimpy/test_chimpy.py/test_list_update_member_and_member_info/swapped operands of `in`