예제 #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)
예제 #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)
예제 #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)
예제 #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
예제 #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
예제 #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
예제 #7
0
def _get_random_email_address():
    email_user_name = get_uuid4_str()
    email_address = email_user_name + "@example.com"
    return email_address
예제 #8
0
def _get_random_email_address():
    email_user_name = get_uuid4_str()
    email_address = email_user_name + '@example.com'
    return email_address