Browse Source

Merge "consume UnorderedList from neutron-lib"

Zuul 1 month ago
parent
commit
a93a92fe5e

+ 0
- 13
neutron/tests/tools.py View File

@@ -204,19 +204,6 @@ def fail(msg=None):
204 204
     raise unittest2.TestCase.failureException(msg)
205 205
 
206 206
 
207
-class UnorderedList(list):
208
-    """A list that is equals to any permutation of itself."""
209
-
210
-    def __eq__(self, other):
211
-        if not isinstance(other, list):
212
-            return False
213
-        return (sorted(self, key=helpers.safe_sort_key) ==
214
-                sorted(other, key=helpers.safe_sort_key))
215
-
216
-    def __neq__(self, other):
217
-        return not self == other
218
-
219
-
220 207
 def get_random_string_list(i=3, n=5):
221 208
     return [helpers.get_random_string(n) for _ in range(0, i)]
222 209
 

+ 1
- 1
neutron/tests/unit/agent/test_securitygroups_rpc.py View File

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

+ 1
- 1
neutron/tests/unit/plugins/ml2/drivers/l2pop/test_db.py View File

@@ -16,6 +16,7 @@ import netaddr
16 16
 from neutron_lib.api.definitions import portbindings
17 17
 from neutron_lib import constants
18 18
 from neutron_lib import context
19
+from neutron_lib.tests import tools
19 20
 from neutron_lib.utils import net
20 21
 from oslo_utils import uuidutils
21 22
 
@@ -28,7 +29,6 @@ from neutron.objects import router as l3_objs
28 29
 from neutron.plugins.ml2.drivers.l2pop import db as l2pop_db
29 30
 from neutron.plugins.ml2 import models
30 31
 from neutron.tests.common import helpers
31
-from neutron.tests import tools
32 32
 from neutron.tests.unit import testlib_api
33 33
 
34 34
 HOST = helpers.HOST

+ 1
- 1
neutron/tests/unit/services/metering/test_metering_plugin.py View File

@@ -18,6 +18,7 @@ from neutron_lib import context
18 18
 from neutron_lib.db import api as db_api
19 19
 from neutron_lib.plugins import constants
20 20
 from neutron_lib.plugins import directory
21
+from neutron_lib.tests import tools
21 22
 from oslo_utils import uuidutils
22 23
 
23 24
 from neutron.api.rpc.agentnotifiers import metering_rpc_agent_api
@@ -27,7 +28,6 @@ from neutron.extensions import l3 as ext_l3
27 28
 from neutron.extensions import metering as ext_metering
28 29
 from neutron.objects import agent as agent_obj
29 30
 from neutron.tests.common import helpers
30
-from neutron.tests import tools
31 31
 from neutron.tests.unit.db.metering import test_metering_db
32 32
 from neutron.tests.unit.db import test_db_base_plugin_v2
33 33
 from neutron.tests.unit.extensions import test_l3

Loading…
Cancel
Save