diff options
| author | Stephen Finucane <sfinucan@redhat.com> | 2023-05-08 11:36:34 +0100 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2023-05-10 10:51:30 +0100 |
| commit | a6f81a736c503e45e1fca9fe49f9f46b9ced7cb8 (patch) | |
| tree | 730284d0b6a1c71b962ac2b63e5cccfe7ed3c15c /openstackclient/tests/unit/api/test_compute_v2.py | |
| parent | 7d80f9e9626d14ce2ab60e4b69e3ccd070f31e0d (diff) | |
| download | python-openstackclient-a6f81a736c503e45e1fca9fe49f9f46b9ced7cb8.tar.gz | |
Blacken openstackclient.api
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I1df5bc4c35f02147fe5ac5b4073f0e01e7d51c2f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/tests/unit/api/test_compute_v2.py')
| -rw-r--r-- | openstackclient/tests/unit/api/test_compute_v2.py | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/openstackclient/tests/unit/api/test_compute_v2.py b/openstackclient/tests/unit/api/test_compute_v2.py index edf5258f..1ed164ac 100644 --- a/openstackclient/tests/unit/api/test_compute_v2.py +++ b/openstackclient/tests/unit/api/test_compute_v2.py @@ -26,7 +26,6 @@ FAKE_URL = 'http://gopher.com/v2' class TestComputeAPIv2(utils.TestCase): - def setUp(self): super(TestComputeAPIv2, self).setUp() sess = session.Session() @@ -35,18 +34,17 @@ class TestComputeAPIv2(utils.TestCase): class TestFloatingIP(TestComputeAPIv2): - FAKE_FLOATING_IP_RESP = { 'id': 1, - 'ip': '203.0.113.11', # TEST-NET-3 - 'fixed_ip': '198.51.100.11', # TEST-NET-2 + 'ip': '203.0.113.11', # TEST-NET-3 + 'fixed_ip': '198.51.100.11', # TEST-NET-2 'pool': 'nova', 'instance_id': None, } FAKE_FLOATING_IP_RESP_2 = { 'id': 2, - 'ip': '203.0.113.12', # TEST-NET-3 - 'fixed_ip': '198.51.100.12', # TEST-NET-2 + 'ip': '203.0.113.12', # TEST-NET-3 + 'fixed_ip': '198.51.100.12', # TEST-NET-2 'pool': 'nova', 'instance_id': None, } @@ -213,7 +211,6 @@ class TestFloatingIP(TestComputeAPIv2): class TestFloatingIPPool(TestComputeAPIv2): - LIST_FLOATING_IP_POOL_RESP = [ {"name": "tide"}, {"name": "press"}, @@ -231,7 +228,6 @@ class TestFloatingIPPool(TestComputeAPIv2): class TestHost(TestComputeAPIv2): - FAKE_HOST_RESP_1 = { "zone": "internal", "host_name": "myhost", @@ -340,7 +336,6 @@ class TestHost(TestComputeAPIv2): class TestNetwork(TestComputeAPIv2): - FAKE_NETWORK_RESP = { 'id': '1', 'label': 'label1', @@ -491,20 +486,19 @@ class TestNetwork(TestComputeAPIv2): class TestSecurityGroup(TestComputeAPIv2): - FAKE_SECURITY_GROUP_RESP = { 'id': '1', 'name': 'sg1', 'description': 'test security group', 'tenant_id': '0123456789', - 'rules': [] + 'rules': [], } FAKE_SECURITY_GROUP_RESP_2 = { 'id': '2', 'name': 'sg2', 'description': 'another test security group', 'tenant_id': '0123456789', - 'rules': [] + 'rules': [], } LIST_SECURITY_GROUP_RESP = [ FAKE_SECURITY_GROUP_RESP_2, @@ -656,8 +650,8 @@ class TestSecurityGroup(TestComputeAPIv2): status_code=200, ) ret = self.api.security_group_set( - security_group='1', - description='desc2') + security_group='1', description='desc2' + ) self.assertEqual(self.FAKE_SECURITY_GROUP_RESP, ret) def test_security_group_set_options_name(self): @@ -679,13 +673,12 @@ class TestSecurityGroup(TestComputeAPIv2): status_code=200, ) ret = self.api.security_group_set( - security_group='sg2', - description='desc2') + security_group='sg2', description='desc2' + ) self.assertEqual(self.FAKE_SECURITY_GROUP_RESP_2, ret) class TestSecurityGroupRule(TestComputeAPIv2): - FAKE_SECURITY_GROUP_RULE_RESP = { 'id': '1', 'name': 'sgr1', |
