Fix negative unit test for sec group rules

Ensure the test fails because the security group
rule could not be created, and not because the security
group was deleted before creating the rule.

Closes-Bug: #1268561

Change-Id: Ib2ea8c4507862d7bb343ce5181cf018b3cdf4b73
This commit is contained in:
Salvatore Orlando 2014-01-13 03:33:40 -08:00
parent d586a957df
commit 95b307bc0c

View File

@ -738,7 +738,9 @@ class TestSecurityGroups(SecurityGroupDBTestCase):
'port_range_max': '22',
'tenant_id': "bad_tenant"}}
res = self._create_security_group_rule(self.fmt, rule)
res = self._create_security_group_rule(self.fmt, rule,
tenant_id='bad_tenant',
set_context=True)
self.deserialize(self.fmt, res)
self.assertEqual(res.status_int, webob.exc.HTTPNotFound.code)