def test_event_lnk_cntct_fields(mock_get): """ add some linked contact fields to event """ bulk = Bulk(test=True) bulk.exports('events', 1) mock_get.return_value = Mock(ok=True, status_code=200) mock_get.return_value.json.return_value = deepcopy(GOOD_FIELDS) bulk.add_linked_fields('contacts', ['C_EmailAddress', 'C_FirstName']) assert bulk.job['fields'] == LINKED_EVENT_CONTACT_FIELDS
def test_cntct_lnk_acct_fields(mock_get): """ add some linked account fields """ bulk = Bulk(test=True) bulk.exports('contacts') mock_get.return_value = Mock(ok=True, status_code=200) mock_get.return_value.json.return_value = deepcopy(GOOD_FIELDS_ACCOUNT) bulk.add_linked_fields('accounts', ['M_CompanyName', 'M_Country']) assert bulk.job['fields'] == LINKED_ACCOUNT_FIELDS