Skip to content

Commit

Permalink
Fix testcase 'test_create_subnet_with_two_host_routes' failed
Browse files Browse the repository at this point in the history
Fix bug 1179348

Change-Id: I0cd5d303da0f394cec173aeee52efcd337282c94
  • Loading branch information
soulxu committed May 13, 2013
1 parent 47c399b commit 8aaf0bd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions quantum/tests/unit/test_db_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2299,12 +2299,20 @@ def _test_create_subnet(self, network=None, expected=None, **kwargs):
# verify the response has each key with the correct value
for k in keys:
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
if expected:
for k in expected:
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

def test_create_subnet(self):
Expand Down

0 comments on commit 8aaf0bd

Please sign in to comment.