Merge "Fix testcase 'test_create_subnet_with_two_host_routes' failed"
This commit is contained in:
commit
855a9610b4
@ -2302,12 +2302,20 @@ class TestSubnetsV2(QuantumDbPluginV2TestCase):
|
|||||||
# verify the response has each key with the correct value
|
# verify the response has each key with the correct value
|
||||||
for k in keys:
|
for k in keys:
|
||||||
self.assertIn(k, subnet['subnet'])
|
self.assertIn(k, subnet['subnet'])
|
||||||
self.assertEqual(subnet['subnet'][k], keys[k])
|
if isinstance(keys[k], list):
|
||||||
|
self.assertEqual(sorted(subnet['subnet'][k]),
|
||||||
|
sorted(keys[k]))
|
||||||
|
else:
|
||||||
|
self.assertEqual(subnet['subnet'][k], keys[k])
|
||||||
# verify the configured validations are correct
|
# verify the configured validations are correct
|
||||||
if expected:
|
if expected:
|
||||||
for k in expected:
|
for k in expected:
|
||||||
self.assertIn(k, subnet['subnet'])
|
self.assertIn(k, subnet['subnet'])
|
||||||
self.assertEqual(subnet['subnet'][k], expected[k])
|
if isinstance(expected[k], list):
|
||||||
|
self.assertEqual(sorted(subnet['subnet'][k]),
|
||||||
|
sorted(expected[k]))
|
||||||
|
else:
|
||||||
|
self.assertEqual(subnet['subnet'][k], expected[k])
|
||||||
return subnet
|
return subnet
|
||||||
|
|
||||||
def test_create_subnet(self):
|
def test_create_subnet(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user