Exemplo n.º 1
0
 def test_unsuccessful_creation(self):
     error_message = 'Whoops!'
     exception = HubspotClientError(error_message, get_uuid4_str())
     simulator = UnsuccessfulCreateProperty(STUB_NUMBER_PROPERTY, exception)
     with assert_raises_regexp(HubspotClientError, error_message):
         with MockPortalConnection(simulator) as connection:
             create_property(STUB_NUMBER_PROPERTY, connection)
Exemplo n.º 2
0
 def test_unsuccessful_creation(self):
     error_message = 'Whoops!'
     exception = HubspotClientError(error_message, get_uuid4_str())
     simulator = UnsuccessfulCreateProperty(STUB_NUMBER_PROPERTY, exception)
     with assert_raises_regexp(HubspotClientError, error_message):
         with MockPortalConnection(simulator) as connection:
             create_property(STUB_NUMBER_PROPERTY, connection)
Exemplo n.º 3
0
 def test_unsuccessful_creation(self):
     property_group = PropertyGroup(self._PROPERTY_GROUP_NAME)
     exception = HubspotClientError('Whoops!', get_uuid4_str())
     simulator = UnsuccessfulCreatePropertyGroup(property_group, exception)
     with assert_raises_regexp(HubspotClientError, str(exception)):
         with MockPortalConnection(simulator) as connection:
             create_property_group(property_group, connection)
Exemplo n.º 4
0
    def _get_contact_profiles_data(contact):
        contact_profile_data = {
            'vid': contact.vid,
            'identities': [
                {'type': 'LEAD_GUID', 'value': get_uuid4_str()},
                {'type': 'EMAIL', 'value': contact.email_address},
                ],
            }
        contact_profiles_data = [contact_profile_data]

        for vid in contact.related_contact_vids:
            contact_profiles_data.append({'vid': vid, 'identities': []})

        return contact_profiles_data
Exemplo n.º 5
0
    def _get_contact_profiles_data(contact):
        contact_profile_data = {
            'vid': contact.vid,
            'identities': [
                {'type': 'LEAD_GUID', 'value': get_uuid4_str()},
                {'type': 'EMAIL', 'value': contact.email_address},
                ],
            }
        contact_profiles_data = [contact_profile_data]

        for vid in contact.related_contact_vids:
            contact_profiles_data.append({'vid': vid, 'identities': []})

        return contact_profiles_data
Exemplo n.º 6
0
    def _get_contact_profiles_data(contact):
        contact_profile_data = {
            "vid": contact.vid,
            "identities": [
                {"type": "LEAD_GUID", "value": get_uuid4_str()},
                {"type": "EMAIL", "value": contact.email_address},
            ],
        }
        contact_profiles_data = [contact_profile_data]

        for vid in contact.related_contact_vids:
            contact_profiles_data.append({"vid": vid, "identities": []})

        return contact_profiles_data
Exemplo n.º 7
0
def _get_random_email_address():
    email_user_name = get_uuid4_str()
    email_address = email_user_name + "@example.com"
    return email_address
Exemplo n.º 8
0
def _get_random_email_address():
    email_user_name = get_uuid4_str()
    email_address = email_user_name + '@example.com'
    return email_address