Merge "Fix testcase 'test_create_subnet_with_two_host_routes' failed"

This commit is contained in:
Jenkins 2013-05-13 12:30:12 +00:00 committed by Gerrit Code Review
commit 8581676fea

View File

@ -2302,11 +2302,19 @@ class TestSubnetsV2(QuantumDbPluginV2TestCase):
# verify the response has each key with the correct value
for k in keys:
self.assertIn(k, subnet['subnet'])
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
if expected:
for k in expected:
self.assertIn(k, subnet['subnet'])
if isinstance(expected[k], list):
self.assertEqual(sorted(subnet['subnet'][k]),
sorted(expected[k]))
else:
self.assertEqual(subnet['subnet'][k], expected[k])
return subnet