Merge "consume UnorderedList from neutron-lib"

This commit is contained in:
Zuul 2019-03-15 20:54:10 +00:00 committed by Gerrit Code Review
commit a93a92fe5e
4 changed files with 3 additions and 16 deletions

View File

@ -204,19 +204,6 @@ def fail(msg=None):
raise unittest2.TestCase.failureException(msg)
class UnorderedList(list):
"""A list that is equals to any permutation of itself."""
def __eq__(self, other):
if not isinstance(other, list):
return False
return (sorted(self, key=helpers.safe_sort_key) ==
sorted(other, key=helpers.safe_sort_key))
def __neq__(self, other):
return not self == other
def get_random_string_list(i=3, n=5):
return [helpers.get_random_string(n) for _ in range(0, i)]

View File

@ -23,6 +23,7 @@ from neutron_lib import constants as const
from neutron_lib import context
from neutron_lib.plugins import directory
from neutron_lib import rpc as n_rpc
from neutron_lib.tests import tools
from oslo_config import cfg
import oslo_messaging
from testtools import matchers
@ -36,7 +37,6 @@ from neutron.api.rpc.handlers import securitygroups_rpc
from neutron.db import securitygroups_rpc_base as sg_db_rpc
from neutron.extensions import securitygroup as ext_sg
from neutron.tests import base
from neutron.tests import tools
from neutron.tests.unit.extensions import test_securitygroup as test_sg
FAKE_PREFIX = {const.IPv4: '10.0.0.0/24',

View File

@ -16,6 +16,7 @@ import netaddr
from neutron_lib.api.definitions import portbindings
from neutron_lib import constants
from neutron_lib import context
from neutron_lib.tests import tools
from neutron_lib.utils import net
from oslo_utils import uuidutils
@ -28,7 +29,6 @@ from neutron.objects import router as l3_objs
from neutron.plugins.ml2.drivers.l2pop import db as l2pop_db
from neutron.plugins.ml2 import models
from neutron.tests.common import helpers
from neutron.tests import tools
from neutron.tests.unit import testlib_api
HOST = helpers.HOST

View File

@ -18,6 +18,7 @@ from neutron_lib import context
from neutron_lib.db import api as db_api
from neutron_lib.plugins import constants
from neutron_lib.plugins import directory
from neutron_lib.tests import tools
from oslo_utils import uuidutils
from neutron.api.rpc.agentnotifiers import metering_rpc_agent_api
@ -27,7 +28,6 @@ from neutron.extensions import l3 as ext_l3
from neutron.extensions import metering as ext_metering
from neutron.objects import agent as agent_obj
from neutron.tests.common import helpers
from neutron.tests import tools
from neutron.tests.unit.db.metering import test_metering_db
from neutron.tests.unit.db import test_db_base_plugin_v2
from neutron.tests.unit.extensions import test_l3