Unorder compare in tests
On occassion the values from schema are presented in a different order. Compare them in an unordered way as we only care that both are present. Change-Id: Ib2d44587196f43c73f4b0a3796fac9f4dc20f20f
This commit is contained in:
parent
d4d7fdc354
commit
6431fae545
@ -121,8 +121,8 @@ class TestController(testtools.TestCase):
|
|||||||
def test_get_schema(self):
|
def test_get_schema(self):
|
||||||
schema = self.controller.get('image')
|
schema = self.controller.get('image')
|
||||||
self.assertEqual('image', schema.name)
|
self.assertEqual('image', schema.name)
|
||||||
self.assertEqual(['name', 'tags'],
|
self.assertEqual(set(['name', 'tags']),
|
||||||
[p.name for p in schema.properties])
|
set([p.name for p in schema.properties]))
|
||||||
|
|
||||||
|
|
||||||
class TestSchemaBasedModel(testtools.TestCase):
|
class TestSchemaBasedModel(testtools.TestCase):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user