summaryrefslogtreecommitdiff
path: root/designate/tests
diff options
context:
space:
mode:
Diffstat (limited to 'designate/tests')
-rw-r--r--designate/tests/__init__.py6
-rw-r--r--designate/tests/fixtures.py10
-rw-r--r--designate/tests/test_api/test_middleware.py4
-rw-r--r--designate/tests/test_api/test_service.py2
-rw-r--r--designate/tests/test_api/test_v2/__init__.py2
-rw-r--r--designate/tests/test_api/test_v2/test_import_export.py2
-rw-r--r--designate/tests/test_api/test_v2/test_recordsets.py4
-rw-r--r--designate/tests/test_api/test_v2/test_tsigkeys.py2
-rw-r--r--designate/tests/test_api/test_v2/test_zones.py6
-rw-r--r--designate/tests/test_central/test_decorator.py4
-rw-r--r--designate/tests/test_central/test_service.py16
-rw-r--r--designate/tests/test_hookpoints.py4
-rw-r--r--designate/tests/test_manage/test_update_pool.py7
-rw-r--r--designate/tests/test_mdns/test_handler.py4
-rw-r--r--designate/tests/test_mdns/test_notify.py4
-rw-r--r--designate/tests/test_notification_handler/test_base.py2
-rw-r--r--designate/tests/test_notification_handler/test_neutron.py2
-rw-r--r--designate/tests/test_notification_handler/test_nova.py2
-rw-r--r--designate/tests/test_producer/test_tasks.py4
-rw-r--r--designate/tests/test_quota/test_quota.py6
-rw-r--r--designate/tests/test_schema/__init__.py2
-rw-r--r--designate/tests/test_schema/test_format.py2
-rw-r--r--designate/tests/test_storage/__init__.py6
-rw-r--r--designate/tests/test_storage/test_sqlalchemy.py2
-rw-r--r--designate/tests/unit/agent/backends/test_bind9.py6
-rw-r--r--designate/tests/unit/agent/backends/test_denominator.py7
-rw-r--r--designate/tests/unit/agent/backends/test_djbdns.py4
-rw-r--r--designate/tests/unit/agent/backends/test_fake.py2
-rw-r--r--designate/tests/unit/agent/backends/test_gdnsd.py2
-rw-r--r--designate/tests/unit/agent/backends/test_knot2.py6
-rw-r--r--designate/tests/unit/agent/backends/test_msdns.py4
-rw-r--r--designate/tests/unit/agent/test_handler.py2
-rw-r--r--designate/tests/unit/agent/test_service.py6
-rw-r--r--designate/tests/unit/api/test_admin_api.py4
-rw-r--r--designate/tests/unit/api/test_api_v2.py2
-rw-r--r--designate/tests/unit/backend/test_agent.py2
-rw-r--r--designate/tests/unit/backend/test_akamai_v2.py4
-rw-r--r--designate/tests/unit/backend/test_bind9.py6
-rw-r--r--designate/tests/unit/backend/test_designate.py4
-rw-r--r--designate/tests/unit/backend/test_dynect.py4
-rw-r--r--designate/tests/unit/backend/test_infoblox.py6
-rw-r--r--designate/tests/unit/backend/test_ns1.py3
-rw-r--r--designate/tests/unit/backend/test_nsd4.py4
-rw-r--r--designate/tests/unit/backend/test_pdns4.py4
-rw-r--r--designate/tests/unit/mdns/test_handler.py2
-rw-r--r--designate/tests/unit/mdns/test_service.py8
-rw-r--r--designate/tests/unit/mdns/test_xfr.py2
-rw-r--r--designate/tests/unit/metrics/test_metrics.py2
-rw-r--r--designate/tests/unit/notification_handler/test_fake.py2
-rw-r--r--designate/tests/unit/objects/test_adapters.py2
-rw-r--r--designate/tests/unit/objects/test_base.py4
-rw-r--r--designate/tests/unit/objects/test_caa_object.py2
-rw-r--r--designate/tests/unit/objects/test_cert_object.py2
-rw-r--r--designate/tests/unit/objects/test_mx_object.py4
-rw-r--r--designate/tests/unit/objects/test_naptr_object.py2
-rw-r--r--designate/tests/unit/objects/test_recordset.py2
-rw-r--r--designate/tests/unit/objects/test_rrdata_a.py2
-rw-r--r--designate/tests/unit/objects/test_rrdata_spf.py2
-rw-r--r--designate/tests/unit/objects/test_rrdata_txt.py2
-rw-r--r--designate/tests/unit/objects/test_sshfp_object.py4
-rw-r--r--designate/tests/unit/objects/test_yaml_adapters.py4
-rw-r--r--designate/tests/unit/objects/test_zone.py2
-rw-r--r--designate/tests/unit/producer/test_service.py2
-rw-r--r--designate/tests/unit/producer/test_tasks.py6
-rw-r--r--designate/tests/unit/scheduler/test_filters.py2
-rw-r--r--designate/tests/unit/sink/test_notifications.py2
-rw-r--r--designate/tests/unit/sink/test_service.py2
-rw-r--r--designate/tests/unit/test_central/test_basic.py6
-rw-r--r--designate/tests/unit/test_central/test_notifications.py2
-rw-r--r--designate/tests/unit/test_context.py2
-rw-r--r--designate/tests/unit/test_dnsutils.py9
-rw-r--r--designate/tests/unit/test_heartbeat_emitter.py2
-rw-r--r--designate/tests/unit/test_upgrade_checks.py2
-rw-r--r--designate/tests/unit/test_utils.py4
-rw-r--r--designate/tests/unit/workers/test_processing.py2
-rw-r--r--designate/tests/unit/workers/test_service.py8
-rw-r--r--designate/tests/unit/workers/test_zone_tasks.py4
77 files changed, 146 insertions, 146 deletions
diff --git a/designate/tests/__init__.py b/designate/tests/__init__.py
index 64e709df..3479f275 100644
--- a/designate/tests/__init__.py
+++ b/designate/tests/__init__.py
@@ -29,15 +29,15 @@ from oslotest import base
from testtools import testcase
import designate.conf
+from designate.context import DesignateContext
from designate import exceptions
+from designate.manage import database as manage_database
from designate import objects
from designate import policy
from designate import storage
-from designate import utils
-from designate.context import DesignateContext
-from designate.manage import database as manage_database
from designate.tests import fixtures
from designate.tests import resources
+from designate import utils
eventlet.monkey_patch(os=False)
diff --git a/designate/tests/fixtures.py b/designate/tests/fixtures.py
index 76d4e479..8ef03fc9 100644
--- a/designate/tests/fixtures.py
+++ b/designate/tests/fixtures.py
@@ -20,26 +20,26 @@
# under the License.
from unittest import mock
+from contextlib import contextmanager
import logging as std_logging
import os
import random
import shutil
import tempfile
-from contextlib import contextmanager
import fixtures
-import tooz.coordination
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import importutils
+import tooz.coordination
-import designate.service
-import designate.utils
from designate import network_api
+from designate.network_api import fake as fake_network_api
from designate import policy
from designate import rpc
-from designate.network_api import fake as fake_network_api
+import designate.service
from designate.sqlalchemy import utils as sqlalchemy_utils
+import designate.utils
"""Test fixtures
"""
diff --git a/designate/tests/test_api/test_middleware.py b/designate/tests/test_api/test_middleware.py
index 3425c1c6..dc754ae4 100644
--- a/designate/tests/test_api/test_middleware.py
+++ b/designate/tests/test_api/test_middleware.py
@@ -19,11 +19,11 @@ from unittest import mock
from oslo_config import cfg
from oslo_messaging.notify import notifier
-from designate.tests.test_api import ApiTestCase
+from designate.api import middleware
from designate import context
from designate import exceptions
from designate import rpc
-from designate.api import middleware
+from designate.tests.test_api import ApiTestCase
class FakeRequest(object):
diff --git a/designate/tests/test_api/test_service.py b/designate/tests/test_api/test_service.py
index e8e054d4..d28857d8 100644
--- a/designate/tests/test_api/test_service.py
+++ b/designate/tests/test_api/test_service.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.tests.test_api import ApiTestCase
from designate.api import service
+from designate.tests.test_api import ApiTestCase
class ApiServiceTest(ApiTestCase):
diff --git a/designate/tests/test_api/test_v2/__init__.py b/designate/tests/test_api/test_v2/__init__.py
index a66ed6c3..27337031 100644
--- a/designate/tests/test_api/test_v2/__init__.py
+++ b/designate/tests/test_api/test_v2/__init__.py
@@ -18,8 +18,8 @@ import itertools
from oslo_log import log as logging
from webtest import TestApp
-from designate.api import v2 as api_v2
from designate.api import middleware
+from designate.api import v2 as api_v2
from designate.tests.test_api import ApiTestCase
diff --git a/designate/tests/test_api/test_v2/test_import_export.py b/designate/tests/test_api/test_v2/test_import_export.py
index aefc6e1d..7855f88b 100644
--- a/designate/tests/test_api/test_v2/test_import_export.py
+++ b/designate/tests/test_api/test_v2/test_import_export.py
@@ -14,8 +14,8 @@
import unittest
from dns import zone as dnszone
-from webtest import TestApp
from oslo_config import cfg
+from webtest import TestApp
from designate.api import admin as admin_api
from designate.api import middleware
diff --git a/designate/tests/test_api/test_v2/test_recordsets.py b/designate/tests/test_api/test_v2/test_recordsets.py
index 9b96157c..933eaaa1 100644
--- a/designate/tests/test_api/test_v2/test_recordsets.py
+++ b/designate/tests/test_api/test_v2/test_recordsets.py
@@ -15,11 +15,11 @@
# under the License.
from unittest.mock import patch
-import oslo_messaging as messaging
from oslo_log import log as logging
+import oslo_messaging as messaging
-from designate import exceptions
from designate.central import service as central_service
+from designate import exceptions
from designate.tests.test_api.test_v2 import ApiV2TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_api/test_v2/test_tsigkeys.py b/designate/tests/test_api/test_v2/test_tsigkeys.py
index 1cf66c4b..65403ab2 100644
--- a/designate/tests/test_api/test_v2/test_tsigkeys.py
+++ b/designate/tests/test_api/test_v2/test_tsigkeys.py
@@ -17,8 +17,8 @@ from unittest.mock import patch
import oslo_messaging as messaging
-from designate import exceptions
from designate.central import service as central_service
+from designate import exceptions
from designate.tests.test_api.test_v2 import ApiV2TestCase
diff --git a/designate/tests/test_api/test_v2/test_zones.py b/designate/tests/test_api/test_v2/test_zones.py
index e9d1c386..24845ef7 100644
--- a/designate/tests/test_api/test_v2/test_zones.py
+++ b/designate/tests/test_api/test_v2/test_zones.py
@@ -13,16 +13,16 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from unittest.mock import patch
from unittest import mock
+from unittest.mock import patch
from oslo_config import cfg
import oslo_messaging as messaging
-from designate import exceptions
-from designate import objects
from designate.central import service as central_service
+from designate import exceptions
from designate.mdns import rpcapi as mdns_api
+from designate import objects
from designate.tests.test_api.test_v2 import ApiV2TestCase
diff --git a/designate/tests/test_central/test_decorator.py b/designate/tests/test_central/test_decorator.py
index 79f7126a..5c4515e0 100644
--- a/designate/tests/test_central/test_decorator.py
+++ b/designate/tests/test_central/test_decorator.py
@@ -14,12 +14,12 @@ from unittest import mock
from oslo_concurrency import lockutils
from oslo_log import log as logging
-from designate import exceptions
-from designate import utils
from designate.central import service
+from designate import exceptions
from designate.objects import record
from designate.objects import zone
from designate.tests.test_central import CentralTestCase
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_central/test_service.py b/designate/tests/test_central/test_service.py
index 26694b9a..7d8df07d 100644
--- a/designate/tests/test_central/test_service.py
+++ b/designate/tests/test_central/test_service.py
@@ -15,27 +15,27 @@
# License for the specific language governing permissions and limitations
# under the License.
-import datetime
+from collections import namedtuple
import copy
+import datetime
import random
-from collections import namedtuple
from unittest import mock
-import testtools
-from testtools.matchers import GreaterThan
from oslo_config import cfg
-from oslo_log import log as logging
from oslo_db import exception as db_exception
-from oslo_versionedobjects import exception as ovo_exc
+from oslo_log import log as logging
from oslo_messaging.notify import notifier
from oslo_messaging.rpc import dispatcher as rpc_dispatcher
+from oslo_versionedobjects import exception as ovo_exc
+import testtools
+from testtools.matchers import GreaterThan
from designate import exceptions
-from designate import objects
from designate.mdns import rpcapi as mdns_api
+from designate import objects
+from designate.storage.impl_sqlalchemy import tables
from designate.tests import fixtures
from designate.tests.test_central import CentralTestCase
-from designate.storage.impl_sqlalchemy import tables
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_hookpoints.py b/designate/tests/test_hookpoints.py
index bb1c6c98..21aaa910 100644
--- a/designate/tests/test_hookpoints.py
+++ b/designate/tests/test_hookpoints.py
@@ -17,11 +17,11 @@ from unittest.mock import Mock
from unittest.mock import patch
from oslo_config import cfg
-from stevedore.hook import HookManager
from stevedore.extension import Extension
+from stevedore.hook import HookManager
-from designate.hookpoints import hook_point
from designate.hookpoints import BaseHook
+from designate.hookpoints import hook_point
from designate.tests import TestCase
diff --git a/designate/tests/test_manage/test_update_pool.py b/designate/tests/test_manage/test_update_pool.py
index 35bc1fa4..f759d178 100644
--- a/designate/tests/test_manage/test_update_pool.py
+++ b/designate/tests/test_manage/test_update_pool.py
@@ -9,13 +9,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+from unittest import mock
+
from oslo_log import log as logging
-from unittest import mock
-from designate.tests.test_manage import DesignateManageTestCase
from designate.manage.pool import PoolCommands
-from designate.tests import fixtures
from designate import objects
+from designate.tests import fixtures
+from designate.tests.test_manage import DesignateManageTestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_mdns/test_handler.py b/designate/tests/test_mdns/test_handler.py
index 09525892..15610ee3 100644
--- a/designate/tests/test_mdns/test_handler.py
+++ b/designate/tests/test_mdns/test_handler.py
@@ -22,13 +22,13 @@ import dns.rdataclass
import dns.rdatatype
import dns.resolver
import dns.rrset
-import testtools
from oslo_config import cfg
+import testtools
from designate import context
+from designate.mdns import handler
from designate import objects
from designate.tests.test_mdns import MdnsTestCase
-from designate.mdns import handler
CONF = cfg.CONF
default_pool_id = CONF['service:central'].default_pool_id
diff --git a/designate/tests/test_mdns/test_notify.py b/designate/tests/test_mdns/test_notify.py
index 566c3d20..56953144 100644
--- a/designate/tests/test_mdns/test_notify.py
+++ b/designate/tests/test_mdns/test_notify.py
@@ -17,13 +17,13 @@ from unittest import mock
from unittest.mock import patch
import dns
+import dns.exception
import dns.message
import dns.query
-import dns.exception
-from designate.tests.test_mdns import MdnsTestCase
from designate.mdns import notify
from designate import objects
+from designate.tests.test_mdns import MdnsTestCase
class MdnsNotifyTest(MdnsTestCase):
diff --git a/designate/tests/test_notification_handler/test_base.py b/designate/tests/test_notification_handler/test_base.py
index 93bb11b6..f1a10dab 100644
--- a/designate/tests/test_notification_handler/test_base.py
+++ b/designate/tests/test_notification_handler/test_base.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.tests import TestCase
from designate.notification_handler import base
+from designate.tests import TestCase
class InheritFormBaseAddressHandler(base.BaseAddressHandler):
diff --git a/designate/tests/test_notification_handler/test_neutron.py b/designate/tests/test_notification_handler/test_neutron.py
index 9373a869..8d15063d 100644
--- a/designate/tests/test_notification_handler/test_neutron.py
+++ b/designate/tests/test_notification_handler/test_neutron.py
@@ -15,10 +15,10 @@
# under the License.
from oslo_log import log as logging
-from designate.tests import TestCase
from designate.notification_handler.neutron import NeutronFloatingHandler
from designate.tests.test_notification_handler import \
NotificationHandlerMixin
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_notification_handler/test_nova.py b/designate/tests/test_notification_handler/test_nova.py
index 4d973987..746380b0 100644
--- a/designate/tests/test_notification_handler/test_nova.py
+++ b/designate/tests/test_notification_handler/test_nova.py
@@ -18,10 +18,10 @@ from unittest import mock
from oslo_log import log as logging
-from designate.tests import TestCase
from designate.notification_handler.nova import NovaFixedHandler
from designate.tests.test_notification_handler import \
NotificationHandlerMixin
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_producer/test_tasks.py b/designate/tests/test_producer/test_tasks.py
index 0ad1ca50..c6403670 100644
--- a/designate/tests/test_producer/test_tasks.py
+++ b/designate/tests/test_producer/test_tasks.py
@@ -19,10 +19,10 @@ import datetime
from oslo_log import log as logging
from oslo_utils import timeutils
+from designate.producer import tasks
from designate.storage.impl_sqlalchemy import tables
-from designate.tests import TestCase
from designate.tests import fixtures
-from designate.producer import tasks
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_quota/test_quota.py b/designate/tests/test_quota/test_quota.py
index 039dbf7e..5e18e790 100644
--- a/designate/tests/test_quota/test_quota.py
+++ b/designate/tests/test_quota/test_quota.py
@@ -15,14 +15,14 @@
# under the License.
from unittest import mock
-from testscenarios import load_tests_apply_scenarios as load_tests # noqa
-import testtools
from oslo_config import cfg
from oslo_log import log as logging
+from testscenarios import load_tests_apply_scenarios as load_tests # noqa
+import testtools
+from designate import exceptions
from designate import quota
from designate import tests
-from designate import exceptions
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_schema/__init__.py b/designate/tests/test_schema/__init__.py
index c78503f9..68c51c4b 100644
--- a/designate/tests/test_schema/__init__.py
+++ b/designate/tests/test_schema/__init__.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.tests import TestCase
from designate import schema
+from designate.tests import TestCase
class TestSchema(TestCase):
diff --git a/designate/tests/test_schema/test_format.py b/designate/tests/test_schema/test_format.py
index 7b37c65c..d7fa1ed3 100644
--- a/designate/tests/test_schema/test_format.py
+++ b/designate/tests/test_schema/test_format.py
@@ -15,8 +15,8 @@
# under the License.
from oslo_log import log as logging
-from designate.tests import TestCase
from designate.schema import format
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_storage/__init__.py b/designate/tests/test_storage/__init__.py
index d7ada332..76e5ea0a 100644
--- a/designate/tests/test_storage/__init__.py
+++ b/designate/tests/test_storage/__init__.py
@@ -16,16 +16,16 @@
import math
from unittest import mock
-import testtools
from oslo_config import cfg
from oslo_log import log as logging
from oslo_messaging.rpc import dispatcher as rpc_dispatcher
+import testtools
+from designate.conf.mdns import DEFAULT_MDNS_PORT
from designate import exceptions
from designate import objects
-from designate.conf.mdns import DEFAULT_MDNS_PORT
-from designate.utils import generate_uuid
from designate.storage.base import Storage as StorageBase
+from designate.utils import generate_uuid
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_storage/test_sqlalchemy.py b/designate/tests/test_storage/test_sqlalchemy.py
index 4543b34e..1979a0ff 100644
--- a/designate/tests/test_storage/test_sqlalchemy.py
+++ b/designate/tests/test_storage/test_sqlalchemy.py
@@ -18,8 +18,8 @@ from unittest import mock
from oslo_log import log as logging
from designate import storage
-from designate.tests import TestCase
from designate.tests.test_storage import StorageTestCase
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/agent/backends/test_bind9.py b/designate/tests/unit/agent/backends/test_bind9.py
index 18f445ff..f080b565 100644
--- a/designate/tests/unit/agent/backends/test_bind9.py
+++ b/designate/tests/unit/agent/backends/test_bind9.py
@@ -17,11 +17,11 @@ from unittest import mock
import dns.resolver
-import designate.tests
-from designate import exceptions
-from designate import utils
from designate.backend.agent_backend import impl_bind9
+from designate import exceptions
+import designate.tests
from designate.tests.unit.agent import backends
+from designate import utils
class Bind9AgentBackendTestCase(designate.tests.TestCase):
diff --git a/designate/tests/unit/agent/backends/test_denominator.py b/designate/tests/unit/agent/backends/test_denominator.py
index 043ae34c..f74e00f6 100644
--- a/designate/tests/unit/agent/backends/test_denominator.py
+++ b/designate/tests/unit/agent/backends/test_denominator.py
@@ -17,15 +17,14 @@ from unittest import mock
from oslo_config import cfg
-import designate.tests
+from designate.backend.agent_backend import impl_denominator
from designate import exceptions
from designate import tests
-from designate import utils
-from designate.backend.agent_backend import impl_denominator
from designate.tests.unit.agent import backends
+from designate import utils
-class DenominatorAgentBackendTestCase(designate.tests.TestCase):
+class DenominatorAgentBackendTestCase(tests.TestCase):
def setUp(self):
super(DenominatorAgentBackendTestCase, self).setUp()
diff --git a/designate/tests/unit/agent/backends/test_djbdns.py b/designate/tests/unit/agent/backends/test_djbdns.py
index 213de11e..518f71e7 100644
--- a/designate/tests/unit/agent/backends/test_djbdns.py
+++ b/designate/tests/unit/agent/backends/test_djbdns.py
@@ -15,9 +15,9 @@
# under the License.
from unittest import mock
-import designate.tests
-from designate import exceptions
from designate.backend.agent_backend import impl_djbdns
+from designate import exceptions
+import designate.tests
from designate.tests.unit.agent import backends
diff --git a/designate/tests/unit/agent/backends/test_fake.py b/designate/tests/unit/agent/backends/test_fake.py
index 00fd6414..7cbe15a3 100644
--- a/designate/tests/unit/agent/backends/test_fake.py
+++ b/designate/tests/unit/agent/backends/test_fake.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import designate.tests
from designate.backend.agent_backend import impl_fake
+import designate.tests
from designate.tests.unit.agent import backends
diff --git a/designate/tests/unit/agent/backends/test_gdnsd.py b/designate/tests/unit/agent/backends/test_gdnsd.py
index e1716377..d790bfef 100644
--- a/designate/tests/unit/agent/backends/test_gdnsd.py
+++ b/designate/tests/unit/agent/backends/test_gdnsd.py
@@ -15,8 +15,8 @@
# under the License.
from unittest import mock
-import designate.tests
from designate.backend.agent_backend import impl_gdnsd
+import designate.tests
class GdnsdAgentBackendTestCase(designate.tests.TestCase):
diff --git a/designate/tests/unit/agent/backends/test_knot2.py b/designate/tests/unit/agent/backends/test_knot2.py
index ce317a3b..b8bbb7a5 100644
--- a/designate/tests/unit/agent/backends/test_knot2.py
+++ b/designate/tests/unit/agent/backends/test_knot2.py
@@ -13,14 +13,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from unittest.mock import call
from unittest import mock
+from unittest.mock import call
from oslo_concurrency import processutils
-import designate.tests
-from designate import exceptions
from designate.backend.agent_backend import impl_knot2
+from designate import exceptions
+import designate.tests
from designate.tests.unit.agent import backends
diff --git a/designate/tests/unit/agent/backends/test_msdns.py b/designate/tests/unit/agent/backends/test_msdns.py
index b8499daa..36f0fde5 100644
--- a/designate/tests/unit/agent/backends/test_msdns.py
+++ b/designate/tests/unit/agent/backends/test_msdns.py
@@ -20,9 +20,9 @@ from os_win import constants
from os_win import exceptions as os_win_exc
from os_win import utilsfactory
-import designate.tests
-from designate import exceptions
from designate.backend.agent_backend import impl_msdns
+from designate import exceptions
+import designate.tests
from designate.tests.unit.agent import backends
diff --git a/designate/tests/unit/agent/test_handler.py b/designate/tests/unit/agent/test_handler.py
index eb1f2f0b..97d3796a 100644
--- a/designate/tests/unit/agent/test_handler.py
+++ b/designate/tests/unit/agent/test_handler.py
@@ -20,8 +20,8 @@ import dns
import dns.resolver
import designate
-import designate.tests
from designate.agent import handler
+import designate.tests
class AgentRequestHandlerTest(designate.tests.TestCase):
diff --git a/designate/tests/unit/agent/test_service.py b/designate/tests/unit/agent/test_service.py
index ac88e8cc..1e205ddb 100644
--- a/designate/tests/unit/agent/test_service.py
+++ b/designate/tests/unit/agent/test_service.py
@@ -15,13 +15,13 @@
# under the License.
from unittest import mock
-import designate.tests
-from designate import dnsutils
-from designate import utils
from designate.agent import service
from designate.backend import agent_backend
from designate.backend.agent_backend import impl_fake
+from designate import dnsutils
+import designate.tests
from designate.tests import fixtures
+from designate import utils
class AgentServiceTest(designate.tests.TestCase):
diff --git a/designate/tests/unit/api/test_admin_api.py b/designate/tests/unit/api/test_admin_api.py
index 56adee5c..d47bfee2 100644
--- a/designate/tests/unit/api/test_admin_api.py
+++ b/designate/tests/unit/api/test_admin_api.py
@@ -15,9 +15,9 @@
# under the License.
from unittest import mock
-import designate.tests
-from designate import exceptions
from designate.api.admin.views import base
+from designate import exceptions
+import designate.tests
class MockRequest(object):
diff --git a/designate/tests/unit/api/test_api_v2.py b/designate/tests/unit/api/test_api_v2.py
index d60e0ccf..813f8f0b 100644
--- a/designate/tests/unit/api/test_api_v2.py
+++ b/designate/tests/unit/api/test_api_v2.py
@@ -15,9 +15,9 @@
# under the License.
from unittest import mock
-import designate.tests
from designate import exceptions
from designate.objects.adapters.api_v2 import base
+import designate.tests
class MockRequest(object):
diff --git a/designate/tests/unit/backend/test_agent.py b/designate/tests/unit/backend/test_agent.py
index d1e585bf..1316dec2 100644
--- a/designate/tests/unit/backend/test_agent.py
+++ b/designate/tests/unit/backend/test_agent.py
@@ -20,9 +20,9 @@ import dns.rdatatype
import designate.backend.agent as agent
import designate.backend.private_codes as pcodes
from designate import exceptions
+from designate.mdns import rpcapi as mdns_api
from designate import objects
from designate import tests
-from designate.mdns import rpcapi as mdns_api
from designate.tests.unit import RoObject
diff --git a/designate/tests/unit/backend/test_akamai_v2.py b/designate/tests/unit/backend/test_akamai_v2.py
index 1a526576..07f7346e 100644
--- a/designate/tests/unit/backend/test_akamai_v2.py
+++ b/designate/tests/unit/backend/test_akamai_v2.py
@@ -19,10 +19,10 @@ from unittest import mock
import requests
-import designate.tests
+from designate.backend import impl_akamai_v2 as akamai
from designate import exceptions
from designate import objects
-from designate.backend import impl_akamai_v2 as akamai
+import designate.tests
from designate.tests import fixtures
diff --git a/designate/tests/unit/backend/test_bind9.py b/designate/tests/unit/backend/test_bind9.py
index c1189e84..f29394ca 100644
--- a/designate/tests/unit/backend/test_bind9.py
+++ b/designate/tests/unit/backend/test_bind9.py
@@ -13,12 +13,12 @@
# under the License.
from unittest import mock
-import designate.tests
+from designate.backend import impl_bind9
from designate import exceptions
from designate import objects
-from designate import utils
-from designate.backend import impl_bind9
+import designate.tests
from designate.tests import fixtures
+from designate import utils
import subprocess
diff --git a/designate/tests/unit/backend/test_designate.py b/designate/tests/unit/backend/test_designate.py
index 6d3225e7..41795a52 100644
--- a/designate/tests/unit/backend/test_designate.py
+++ b/designate/tests/unit/backend/test_designate.py
@@ -19,9 +19,9 @@ from designateclient import exceptions
from designateclient.v2 import client
from oslo_log import log as logging
-import designate.tests
-from designate import objects
from designate.backend import impl_designate
+from designate import objects
+import designate.tests
from designate.tests import fixtures
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/backend/test_dynect.py b/designate/tests/unit/backend/test_dynect.py
index 35377259..307666aa 100644
--- a/designate/tests/unit/backend/test_dynect.py
+++ b/designate/tests/unit/backend/test_dynect.py
@@ -15,9 +15,9 @@
# under the License.
import requests_mock
-import designate.tests
-from designate import objects
from designate.backend import impl_dynect
+from designate import objects
+import designate.tests
MASTERS = ["10.0.0.1"]
CONTACT = 'jdoe@myco.biz'
diff --git a/designate/tests/unit/backend/test_infoblox.py b/designate/tests/unit/backend/test_infoblox.py
index 76f1c4b9..54de1b1c 100644
--- a/designate/tests/unit/backend/test_infoblox.py
+++ b/designate/tests/unit/backend/test_infoblox.py
@@ -16,12 +16,12 @@ from unittest import mock
import requests_mock
-import designate.tests
-from designate import exceptions
-from designate import objects
from designate.backend import impl_infoblox
from designate.backend.impl_infoblox import ibexceptions
+from designate import exceptions
from designate.mdns import rpcapi as mdns_rpcapi
+from designate import objects
+import designate.tests
class InfobloxBackendTestCase(designate.tests.TestCase):
diff --git a/designate/tests/unit/backend/test_ns1.py b/designate/tests/unit/backend/test_ns1.py
index edb15de8..3047d14b 100644
--- a/designate/tests/unit/backend/test_ns1.py
+++ b/designate/tests/unit/backend/test_ns1.py
@@ -14,9 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import requests_mock
+
+from designate.backend import impl_ns1
from designate import exceptions
from designate import objects
-from designate.backend import impl_ns1
import designate.tests
from designate.tests import fixtures
diff --git a/designate/tests/unit/backend/test_nsd4.py b/designate/tests/unit/backend/test_nsd4.py
index cf841d99..0a6b2c2b 100644
--- a/designate/tests/unit/backend/test_nsd4.py
+++ b/designate/tests/unit/backend/test_nsd4.py
@@ -19,10 +19,10 @@ from unittest import mock
import eventlet
-import designate.tests
+from designate.backend import impl_nsd4
from designate import exceptions
from designate import objects
-from designate.backend import impl_nsd4
+import designate.tests
class NSD4BackendTestCase(designate.tests.TestCase):
diff --git a/designate/tests/unit/backend/test_pdns4.py b/designate/tests/unit/backend/test_pdns4.py
index 9cfc779e..9672b4b7 100644
--- a/designate/tests/unit/backend/test_pdns4.py
+++ b/designate/tests/unit/backend/test_pdns4.py
@@ -13,10 +13,10 @@ from unittest import mock
import requests_mock
-from designate import exceptions
-from designate import objects
from designate.backend import impl_pdns4
+from designate import exceptions
from designate.mdns import rpcapi as mdns_rpcapi
+from designate import objects
import designate.tests
from designate.tests import fixtures
diff --git a/designate/tests/unit/mdns/test_handler.py b/designate/tests/unit/mdns/test_handler.py
index 92a35a93..93ea162c 100644
--- a/designate/tests/unit/mdns/test_handler.py
+++ b/designate/tests/unit/mdns/test_handler.py
@@ -21,8 +21,8 @@ from oslo_config import fixture as cfg_fixture
import oslotest.base
from designate import exceptions
-from designate import objects
from designate.mdns import handler
+from designate import objects
from designate.tests import fixtures
CONF = cfg.CONF
diff --git a/designate/tests/unit/mdns/test_service.py b/designate/tests/unit/mdns/test_service.py
index 3ec53590..4ea8c1d1 100644
--- a/designate/tests/unit/mdns/test_service.py
+++ b/designate/tests/unit/mdns/test_service.py
@@ -15,18 +15,18 @@
# under the License.
from unittest import mock
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
+import oslotest.base
import designate.dnsutils
+from designate.mdns import handler
+from designate.mdns import service
import designate.rpc
import designate.service
from designate import storage
-import designate.utils
-from designate.mdns import handler
-from designate.mdns import service
from designate.tests import fixtures
+import designate.utils
CONF = cfg.CONF
diff --git a/designate/tests/unit/mdns/test_xfr.py b/designate/tests/unit/mdns/test_xfr.py
index 13928cf8..8aef1b77 100644
--- a/designate/tests/unit/mdns/test_xfr.py
+++ b/designate/tests/unit/mdns/test_xfr.py
@@ -20,9 +20,9 @@ from oslo_config import fixture as cfg_fixture
import oslotest.base
-from designate import objects
from designate import dnsutils
from designate.mdns import xfr
+from designate import objects
from designate.tests import fixtures
diff --git a/designate/tests/unit/metrics/test_metrics.py b/designate/tests/unit/metrics/test_metrics.py
index 951f0033..bcb855a7 100644
--- a/designate/tests/unit/metrics/test_metrics.py
+++ b/designate/tests/unit/metrics/test_metrics.py
@@ -22,8 +22,8 @@ from oslo_config import fixture as cfg_fixture
from designate import metrics
from designate.metrics_client import noop
-from designate.tests import TestCase
from designate.tests import fixtures
+from designate.tests import TestCase
class TestNoopMetrics(TestCase):
diff --git a/designate/tests/unit/notification_handler/test_fake.py b/designate/tests/unit/notification_handler/test_fake.py
index b1803da0..a915b2ab 100644
--- a/designate/tests/unit/notification_handler/test_fake.py
+++ b/designate/tests/unit/notification_handler/test_fake.py
@@ -11,8 +11,8 @@
# under the License.mport threading
from unittest import mock
-import oslotest.base
from oslo_config import cfg
+import oslotest.base
from designate.notification_handler import fake
from designate.tests import test_notification_handler
diff --git a/designate/tests/unit/objects/test_adapters.py b/designate/tests/unit/objects/test_adapters.py
index 94ae79cb..8cd5f631 100644
--- a/designate/tests/unit/objects/test_adapters.py
+++ b/designate/tests/unit/objects/test_adapters.py
@@ -16,9 +16,9 @@
import datetime
from unittest.mock import Mock
-import oslotest.base
from oslo_log import log as logging
from oslo_utils import timeutils
+import oslotest.base
from designate import objects
from designate.objects import adapters
diff --git a/designate/tests/unit/objects/test_base.py b/designate/tests/unit/objects/test_base.py
index 6fa27858..b6d8079e 100644
--- a/designate/tests/unit/objects/test_base.py
+++ b/designate/tests/unit/objects/test_base.py
@@ -17,10 +17,10 @@ import copy
from operator import attrgetter
from unittest import mock
-import oslotest.base
-import testtools
from oslo_log import log as logging
from oslo_serialization import jsonutils
+import oslotest.base
+import testtools
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_caa_object.py b/designate/tests/unit/objects/test_caa_object.py
index 877ffb25..7ab7dd86 100644
--- a/designate/tests/unit/objects/test_caa_object.py
+++ b/designate/tests/unit/objects/test_caa_object.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import objects
diff --git a/designate/tests/unit/objects/test_cert_object.py b/designate/tests/unit/objects/test_cert_object.py
index a2f70d8d..c650b6f0 100644
--- a/designate/tests/unit/objects/test_cert_object.py
+++ b/designate/tests/unit/objects/test_cert_object.py
@@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_mx_object.py b/designate/tests/unit/objects/test_mx_object.py
index 9396da56..589e5be8 100644
--- a/designate/tests/unit/objects/test_mx_object.py
+++ b/designate/tests/unit/objects/test_mx_object.py
@@ -13,11 +13,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
-from designate import objects
from designate.exceptions import InvalidObject
+from designate import objects
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/objects/test_naptr_object.py b/designate/tests/unit/objects/test_naptr_object.py
index e1fb3e90..4415bcbd 100644
--- a/designate/tests/unit/objects/test_naptr_object.py
+++ b/designate/tests/unit/objects/test_naptr_object.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import objects
diff --git a/designate/tests/unit/objects/test_recordset.py b/designate/tests/unit/objects/test_recordset.py
index 37d625c4..634221bf 100644
--- a/designate/tests/unit/objects/test_recordset.py
+++ b/designate/tests/unit/objects/test_recordset.py
@@ -16,8 +16,8 @@
import itertools
from unittest import mock
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_rrdata_a.py b/designate/tests/unit/objects/test_rrdata_a.py
index fc7bbfda..3b508c3a 100644
--- a/designate/tests/unit/objects/test_rrdata_a.py
+++ b/designate/tests/unit/objects/test_rrdata_a.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_rrdata_spf.py b/designate/tests/unit/objects/test_rrdata_spf.py
index b60f00ae..4e1bc102 100644
--- a/designate/tests/unit/objects/test_rrdata_spf.py
+++ b/designate/tests/unit/objects/test_rrdata_spf.py
@@ -9,8 +9,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_rrdata_txt.py b/designate/tests/unit/objects/test_rrdata_txt.py
index 22274816..3802884a 100644
--- a/designate/tests/unit/objects/test_rrdata_txt.py
+++ b/designate/tests/unit/objects/test_rrdata_txt.py
@@ -9,8 +9,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_sshfp_object.py b/designate/tests/unit/objects/test_sshfp_object.py
index 5e989a9a..ac1ea380 100644
--- a/designate/tests/unit/objects/test_sshfp_object.py
+++ b/designate/tests/unit/objects/test_sshfp_object.py
@@ -13,11 +13,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
-from designate import objects
from designate.exceptions import InvalidObject
+from designate import objects
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/objects/test_yaml_adapters.py b/designate/tests/unit/objects/test_yaml_adapters.py
index 05e53e7d..532798a0 100644
--- a/designate/tests/unit/objects/test_yaml_adapters.py
+++ b/designate/tests/unit/objects/test_yaml_adapters.py
@@ -15,12 +15,12 @@
# under the License.
import os
+from oslo_log import log as logging
import oslotest.base
import yaml
-from oslo_log import log as logging
-from designate import objects
from designate.conf.mdns import DEFAULT_MDNS_PORT
+from designate import objects
from designate.objects import adapters
from designate.tests import resources
diff --git a/designate/tests/unit/objects/test_zone.py b/designate/tests/unit/objects/test_zone.py
index 11fe3f08..126ed747 100644
--- a/designate/tests/unit/objects/test_zone.py
+++ b/designate/tests/unit/objects/test_zone.py
@@ -15,8 +15,8 @@
# under the License.
import unittest
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/producer/test_service.py b/designate/tests/unit/producer/test_service.py
index 6bbd89ed..a4e4d8af 100644
--- a/designate/tests/unit/producer/test_service.py
+++ b/designate/tests/unit/producer/test_service.py
@@ -20,9 +20,9 @@ Unit-test Producer service
from unittest import mock
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
+import oslotest.base
from designate.producer import service
import designate.service
diff --git a/designate/tests/unit/producer/test_tasks.py b/designate/tests/unit/producer/test_tasks.py
index 795ff6f3..a4461ded 100644
--- a/designate/tests/unit/producer/test_tasks.py
+++ b/designate/tests/unit/producer/test_tasks.py
@@ -21,15 +21,15 @@ import datetime
from unittest import mock
import fixtures
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
from oslo_utils import timeutils
+import oslotest.base
-from designate import context
-from designate import rpc
from designate.central import rpcapi as central_api
+from designate import context
from designate.producer import tasks
+from designate import rpc
from designate.tests.unit import RoObject
from designate.utils import generate_uuid
diff --git a/designate/tests/unit/scheduler/test_filters.py b/designate/tests/unit/scheduler/test_filters.py
index 78570e80..44b89242 100644
--- a/designate/tests/unit/scheduler/test_filters.py
+++ b/designate/tests/unit/scheduler/test_filters.py
@@ -18,12 +18,12 @@ import fixtures
from designate import exceptions
from designate import objects
from designate import policy
-from designate import tests
from designate.scheduler.filters import attribute_filter
from designate.scheduler.filters import default_pool_filter
from designate.scheduler.filters import fallback_filter
from designate.scheduler.filters import in_doubt_default_pool_filter
from designate.scheduler.filters import pool_id_attribute_filter
+from designate import tests
class SchedulerFilterTest(tests.TestCase):
diff --git a/designate/tests/unit/sink/test_notifications.py b/designate/tests/unit/sink/test_notifications.py
index b80b8a2f..b47ff207 100644
--- a/designate/tests/unit/sink/test_notifications.py
+++ b/designate/tests/unit/sink/test_notifications.py
@@ -12,8 +12,8 @@
from unittest import mock
-import oslotest.base
from oslo_config import cfg
+import oslotest.base
from designate.notification_handler import fake
from designate.sink import service
diff --git a/designate/tests/unit/sink/test_service.py b/designate/tests/unit/sink/test_service.py
index 3ee95aad..f750af64 100644
--- a/designate/tests/unit/sink/test_service.py
+++ b/designate/tests/unit/sink/test_service.py
@@ -11,9 +11,9 @@
# under the License.mport threading
from unittest import mock
-import designate.tests
import designate.rpc
from designate.sink import service
+import designate.tests
from designate.tests import fixtures
diff --git a/designate/tests/unit/test_central/test_basic.py b/designate/tests/unit/test_central/test_basic.py
index b7711955..45f528e4 100644
--- a/designate/tests/unit/test_central/test_basic.py
+++ b/designate/tests/unit/test_central/test_basic.py
@@ -18,19 +18,19 @@ from unittest import mock
from unittest.mock import patch
import fixtures
-import testtools
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
from oslo_log import log as logging
from oslo_messaging.rpc import dispatcher as rpc_dispatcher
from oslotest import base
+import testtools
import designate.central.service
+from designate.central.service import Service
from designate import exceptions
from designate import objects
-from designate.central.service import Service
-from designate.tests import TestCase
from designate.tests.fixtures import random_seed
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/test_central/test_notifications.py b/designate/tests/unit/test_central/test_notifications.py
index 7e3221c6..83fa66f9 100644
--- a/designate/tests/unit/test_central/test_notifications.py
+++ b/designate/tests/unit/test_central/test_notifications.py
@@ -18,8 +18,8 @@ from unittest import mock
from oslo_log import log as logging
-from designate import objects
from designate import notifications
+from designate import objects
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/test_context.py b/designate/tests/unit/test_context.py
index 81fa61c4..ad1d9022 100644
--- a/designate/tests/unit/test_context.py
+++ b/designate/tests/unit/test_context.py
@@ -17,10 +17,10 @@ from unittest import mock
import testtools
-import designate.tests
from designate import context
from designate import exceptions
from designate import policy
+import designate.tests
class TestDesignateContext(designate.tests.TestCase):
diff --git a/designate/tests/unit/test_dnsutils.py b/designate/tests/unit/test_dnsutils.py
index 8345b8ef..0dd4c4c8 100644
--- a/designate/tests/unit/test_dnsutils.py
+++ b/designate/tests/unit/test_dnsutils.py
@@ -24,12 +24,11 @@ import dns.rdatatype
import dns.zone
import eventlet
import oslotest.base
-from dns import zone as dnszone
-import designate.tests
from designate import dnsutils
from designate import exceptions
from designate import objects
+import designate.tests
SAMPLES = {
("cname.example.com.", "CNAME"): {
@@ -94,7 +93,7 @@ class TestUtils(designate.tests.TestCase):
def test_from_dnspython_zone(self):
zone_file = self.get_zonefile_fixture()
- dnspython_zone = dnszone.from_text(
+ dnspython_zone = dns.zone.from_text(
zone_file,
relativize=False,
check_origin=False
@@ -107,7 +106,7 @@ class TestUtils(designate.tests.TestCase):
def test_from_dnspython_zone_no_soa(self):
zone_file = self.get_zonefile_fixture(variant='nosoa')
- dnspython_zone = dnszone.from_text(
+ dnspython_zone = dns.zone.from_text(
zone_file,
relativize=False,
check_origin=False
@@ -122,7 +121,7 @@ class TestUtils(designate.tests.TestCase):
def test_parse_zone(self):
zone_file = self.get_zonefile_fixture()
- dnspython_zone = dnszone.from_text(
+ dnspython_zone = dns.zone.from_text(
zone_file,
# Don't relativize, otherwise we end up with '@' record names.
relativize=False,
diff --git a/designate/tests/unit/test_heartbeat_emitter.py b/designate/tests/unit/test_heartbeat_emitter.py
index 547bd048..d04ed665 100644
--- a/designate/tests/unit/test_heartbeat_emitter.py
+++ b/designate/tests/unit/test_heartbeat_emitter.py
@@ -14,10 +14,10 @@
import time
from unittest import mock
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
from oslo_service import loopingcall
+import oslotest.base
from designate import heartbeat_emitter
from designate import objects
diff --git a/designate/tests/unit/test_upgrade_checks.py b/designate/tests/unit/test_upgrade_checks.py
index 31c21ccd..da8f2ffb 100644
--- a/designate/tests/unit/test_upgrade_checks.py
+++ b/designate/tests/unit/test_upgrade_checks.py
@@ -18,8 +18,8 @@ from sqlalchemy.schema import MetaData
from sqlalchemy.schema import Table
from designate.cmd import status
-from designate import tests
from designate.sqlalchemy import session
+from designate import tests
class TestDuplicateServiceStatus(tests.TestCase):
diff --git a/designate/tests/unit/test_utils.py b/designate/tests/unit/test_utils.py
index 62e909d2..aabaa885 100644
--- a/designate/tests/unit/test_utils.py
+++ b/designate/tests/unit/test_utils.py
@@ -13,15 +13,15 @@ import random
from unittest import mock
import jinja2
-import oslotest.base
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
from oslo_utils import timeutils
+import oslotest.base
from designate import exceptions
-from designate import utils
from designate.tests import fixtures
+from designate import utils
CONF = cfg.CONF
diff --git a/designate/tests/unit/workers/test_processing.py b/designate/tests/unit/workers/test_processing.py
index 7ddde8f4..463c82f4 100644
--- a/designate/tests/unit/workers/test_processing.py
+++ b/designate/tests/unit/workers/test_processing.py
@@ -16,8 +16,8 @@
from unittest import mock
from designate import exceptions
-from designate.tests import TestCase
from designate.tests import fixtures
+from designate.tests import TestCase
from designate.worker import processing
diff --git a/designate/tests/unit/workers/test_service.py b/designate/tests/unit/workers/test_service.py
index 73428f83..b341f3c3 100644
--- a/designate/tests/unit/workers/test_service.py
+++ b/designate/tests/unit/workers/test_service.py
@@ -15,16 +15,16 @@
# under the License.mport threading
from unittest import mock
-import oslo_messaging as messaging
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
+import oslo_messaging as messaging
+import oslotest.base
-import designate.service
-import designate.tests
from designate import backend
from designate import exceptions
from designate import objects
+import designate.service
+import designate.tests
from designate.tests import fixtures
from designate.worker import processing
from designate.worker import service
diff --git a/designate/tests/unit/workers/test_zone_tasks.py b/designate/tests/unit/workers/test_zone_tasks.py
index 25b9c41a..1b209862 100644
--- a/designate/tests/unit/workers/test_zone_tasks.py
+++ b/designate/tests/unit/workers/test_zone_tasks.py
@@ -16,16 +16,16 @@
from unittest import mock
import dns.exception
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
+import oslotest.base
from designate import exceptions
from designate import objects
from designate.tests.unit import utils
from designate.worker import processing
-from designate.worker import utils as wutils
from designate.worker.tasks import zone
+from designate.worker import utils as wutils
CONF = cfg.CONF