コード例 #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
ファイル: testing.py プロジェクト: DobaTech/hubspot-contacts
    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
ファイル: testing.py プロジェクト: congvd/hubspot-contacts
    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
ファイル: testing.py プロジェクト: 2degrees/hubspot-contacts
    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