def test_invalid_property_raises_hubspot_client_error(self): contact = make_contact(None, properties={'is_polite': 'notavalidinput'}) with assert_raises(HubspotClientError) as context: with self._make_connection_for_contact_with_exception( contact, HubspotClientError("Property notavalidinput is invalid", "request-id")) as connection: create_contact(contact, connection) eq_(context.exception.message, "Property notavalidinput is invalid")
def test_create_single_contact(self): contact = make_contact(None) with self._make_connection_for_contact(1, contact) as connection: vid = create_contact(contact, connection) eq_(1, vid)