diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-03-11 01:33:50 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-03-11 01:33:50 +0000 |
| commit | d4b71ea890b2a32db78f874e573eb0a79dc3a4e7 (patch) | |
| tree | 08c0aebc4542d291fd3992aaf680a928d1593798 /openstackclient/tests/compute | |
| parent | 4bb48c088d6be71a138990dd2a0fe25ec269ba9e (diff) | |
| parent | 564c8ff2403da87b96562076865f42426a4f8eac (diff) | |
| download | python-openstackclient-d4b71ea890b2a32db78f874e573eb0a79dc3a4e7.tar.gz | |
Merge "Refactor security group show to use SDK"
Diffstat (limited to 'openstackclient/tests/compute')
| -rw-r--r-- | openstackclient/tests/compute/v2/fakes.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/openstackclient/tests/compute/v2/fakes.py b/openstackclient/tests/compute/v2/fakes.py index 11d9ff1b..26d3a283 100644 --- a/openstackclient/tests/compute/v2/fakes.py +++ b/openstackclient/tests/compute/v2/fakes.py @@ -333,7 +333,9 @@ class FakeSecurityGroup(object): security_group_attrs.update(attrs) # Set default methods. - security_group_methods = {} + security_group_methods = { + 'keys': ['id', 'name', 'description', 'tenant_id', 'rules'], + } # Overwrite default methods. security_group_methods.update(methods) @@ -369,7 +371,7 @@ class FakeSecurityGroupRule(object): """Fake one or more security group rules.""" @staticmethod - def create_one_security_group_rule(attrs={}, methods={}): + def create_one_security_group_rule(attrs=None, methods=None): """Create a fake security group rule. :param Dictionary attrs: @@ -379,6 +381,11 @@ class FakeSecurityGroupRule(object): :return: A FakeResource object, with id, etc. """ + if attrs is None: + attrs = {} + if methods is None: + methods = {} + # Set default attributes. security_group_rule_attrs = { 'from_port': -1, @@ -406,7 +413,7 @@ class FakeSecurityGroupRule(object): return security_group_rule @staticmethod - def create_security_group_rules(attrs={}, methods={}, count=2): + def create_security_group_rules(attrs=None, methods=None, count=2): """Create multiple fake security group rules. :param Dictionary attrs: |
