Fix mocks on update firewall rule tests

The new ip_version attribute was not added to existing
tests.

Change-Id: I55555a4ccdd4759154197e5e7a9a01e6ab207463
Closes-Bug: #1517670
This commit is contained in:
lin-hua-cheng 2015-11-18 19:10:04 -08:00
parent 248ce930ac
commit 64a127fbd7
2 changed files with 12 additions and 6 deletions

View File

@ -241,7 +241,7 @@ class FirewallTests(test.TestCase):
'destination_port': rule1.destination_port,
'shared': rule1.shared,
'enabled': rule1.enabled,
'ip_version': 4
'ip_version': rule1.ip_version
}
api.fwaas.rule_create(
@ -265,7 +265,7 @@ class FirewallTests(test.TestCase):
'destination_port': rule1.destination_port,
'shared': rule1.shared,
'enabled': rule1.enabled,
'ip_version': 4
'ip_version': rule1.ip_version
}
api.fwaas.rule_create(
@ -289,7 +289,7 @@ class FirewallTests(test.TestCase):
'source_port': rule1.source_port,
'shared': rule1.shared,
'enabled': rule1.enabled,
'ip_version': 4
'ip_version': rule1.ip_version
}
api.fwaas.rule_create(
@ -484,6 +484,7 @@ class FirewallTests(test.TestCase):
'action': 'ALLOW',
'shared': False,
'enabled': True,
'ip_version': rule.ip_version,
'source_ip_address': rule.source_ip_address,
'destination_ip_address': None,
'source_port': None,
@ -518,6 +519,7 @@ class FirewallTests(test.TestCase):
'action': 'ALLOW',
'shared': False,
'enabled': True,
'ip_version': rule.ip_version,
'source_ip_address': rule.source_ip_address,
'destination_ip_address': None,
'source_port': None,
@ -551,6 +553,7 @@ class FirewallTests(test.TestCase):
'action': 'ALLOW',
'shared': False,
'enabled': True,
'ip_version': rule.ip_version,
'source_ip_address': rule.source_ip_address,
'destination_ip_address': None,
'source_port': None,

View File

@ -950,7 +950,8 @@ def data(TEST):
'firewall_policy_id': 'abcdef-c3eb-4fee-9763-12de3338041e',
'position': 1,
'shared': True,
'enabled': True}
'enabled': True,
'ip_version': '4'}
TEST.api_fw_rules.add(rule1_dict)
rule1 = fwaas.Rule(copy.deepcopy(rule1_dict))
@ -971,7 +972,8 @@ def data(TEST):
'firewall_policy_id': 'abcdef-c3eb-4fee-9763-12de3338041e',
'position': 2,
'shared': True,
'enabled': True}
'enabled': True,
'ip_version': '6'}
TEST.api_fw_rules.add(rule2_dict)
rule2 = fwaas.Rule(copy.deepcopy(rule2_dict))
@ -992,7 +994,8 @@ def data(TEST):
'firewall_policy_id': None,
'position': None,
'shared': True,
'enabled': True}
'enabled': True,
'ip_version': '4'}
TEST.api_fw_rules.add(rule3_dict)
rule3 = fwaas.Rule(copy.deepcopy(rule3_dict))