summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/tests/unit')
-rw-r--r--openstackclient/tests/unit/network/v2/fakes.py2
-rw-r--r--openstackclient/tests/unit/network/v2/test_security_group_rule_network.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py
index 100ea2b1..e41621a4 100644
--- a/openstackclient/tests/unit/network/v2/fakes.py
+++ b/openstackclient/tests/unit/network/v2/fakes.py
@@ -1305,7 +1305,7 @@ class FakeSecurityGroupRule(object):
'id': 'security-group-rule-id-' + uuid.uuid4().hex,
'port_range_max': None,
'port_range_min': None,
- 'protocol': 'tcp',
+ 'protocol': None,
'remote_group_id': None,
'remote_ip_prefix': '0.0.0.0/0',
'security_group_id': 'security-group-id-' + uuid.uuid4().hex,
diff --git a/openstackclient/tests/unit/network/v2/test_security_group_rule_network.py b/openstackclient/tests/unit/network/v2/test_security_group_rule_network.py
index 2b0de0d2..eb0cf310 100644
--- a/openstackclient/tests/unit/network/v2/test_security_group_rule_network.py
+++ b/openstackclient/tests/unit/network/v2/test_security_group_rule_network.py
@@ -168,10 +168,12 @@ class TestCreateSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
def test_create_default_rule(self):
self._setup_security_group_rule({
+ 'protocol': 'tcp',
'port_range_max': 443,
'port_range_min': 443,
})
arglist = [
+ '--protocol', 'tcp',
'--dst-port', str(self._security_group_rule.port_range_min),
self._security_group.id,
]
@@ -258,10 +260,12 @@ class TestCreateSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
def test_create_remote_group(self):
self._setup_security_group_rule({
+ 'protocol': 'tcp',
'port_range_max': 22,
'port_range_min': 22,
})
arglist = [
+ '--protocol', 'tcp',
'--dst-port', str(self._security_group_rule.port_range_min),
'--ingress',
'--remote-group', self._security_group.name,