diff --git a/hubspot_xpro/api.py b/hubspot_xpro/api.py index a0190fa8d..8dee2712f 100644 --- a/hubspot_xpro/api.py +++ b/hubspot_xpro/api.py @@ -6,6 +6,7 @@ from django.contrib.contenttypes.models import ContentType from django.db.models import Q +from hubspot.crm.objects import SimplePublicObject, SimplePublicObjectInput from mitol.hubspot_api.api import ( HubspotApi, HubspotAssociationType, @@ -26,7 +27,6 @@ from b2b_ecommerce.constants import B2B_ORDER_PREFIX from b2b_ecommerce.models import B2BLine, B2BOrder from ecommerce.models import Line, Order, Product, ProductVersion -from hubspot.crm.objects import SimplePublicObject, SimplePublicObjectInput from users.models import User log = logging.getLogger(__name__) diff --git a/hubspot_xpro/conftest.py b/hubspot_xpro/conftest.py index 4ed6da99a..93d0fe047 100644 --- a/hubspot_xpro/conftest.py +++ b/hubspot_xpro/conftest.py @@ -7,12 +7,12 @@ import pytest from django.contrib.contenttypes.models import ContentType +from hubspot.crm.objects import SimplePublicObject from mitol.hubspot_api.factories import HubspotObjectFactory from b2b_ecommerce import factories as b2b_factories from ecommerce import factories from ecommerce.models import Order, Product -from hubspot.crm.objects import SimplePublicObject from users.models import User TIMESTAMPS = [ diff --git a/hubspot_xpro/tasks.py b/hubspot_xpro/tasks.py index c3742f500..562113196 100644 --- a/hubspot_xpro/tasks.py +++ b/hubspot_xpro/tasks.py @@ -9,6 +9,8 @@ import celery from django.conf import settings from django.contrib.contenttypes.models import ContentType +from hubspot.crm.associations import BatchInputPublicAssociation, PublicAssociation +from hubspot.crm.objects import ApiException, BatchInputSimplePublicObjectInput from mitol.common.decorators import single_task from mitol.common.utils import chunks from mitol.hubspot_api.api import HubspotApi, HubspotAssociationType, HubspotObjectType @@ -18,8 +20,6 @@ from b2b_ecommerce.models import B2BOrder from ecommerce.models import Order -from hubspot.crm.associations import BatchInputPublicAssociation, PublicAssociation -from hubspot.crm.objects import ApiException, BatchInputSimplePublicObjectInput from hubspot_xpro import api from hubspot_xpro.api import get_hubspot_id_for_object from mitxpro.celery import app diff --git a/hubspot_xpro/tasks_test.py b/hubspot_xpro/tasks_test.py index dc19630d0..24783b19a 100644 --- a/hubspot_xpro/tasks_test.py +++ b/hubspot_xpro/tasks_test.py @@ -8,6 +8,8 @@ import pytest from django.contrib.contenttypes.models import ContentType from faker import Faker +from hubspot.crm.associations import BatchInputPublicAssociation, PublicAssociation +from hubspot.crm.objects import ApiException, BatchInputSimplePublicObjectInput from mitol.hubspot_api.api import HubspotAssociationType, HubspotObjectType from mitol.hubspot_api.exceptions import TooManyRequestsException from mitol.hubspot_api.factories import HubspotObjectFactory, SimplePublicObjectFactory @@ -22,8 +24,6 @@ ProductVersionFactory, ) from ecommerce.models import Order, Product -from hubspot.crm.associations import BatchInputPublicAssociation, PublicAssociation -from hubspot.crm.objects import ApiException, BatchInputSimplePublicObjectInput from hubspot_xpro import tasks from hubspot_xpro.api import make_contact_sync_message from hubspot_xpro.tasks import task_obj_lock