@@ -32,7 +32,7 @@ def setUp(self):
3232 # TODO(stephenfin): Switch to spec_set once keystoneauth exposes
3333 # instance attributes as class attributes
3434 # https://review.opendev.org/c/openstack/keystoneauth/+/994090
35- self .volume_sdk_client = mock .Mock (spec = block_storage_v2 .Proxy )
35+ self .volume_client = mock .Mock (spec = block_storage_v2 .Proxy )
3636
3737 def test_find_consistency_group_by_id (self ):
3838 cg_id = uuid .uuid4 ().hex
@@ -48,13 +48,13 @@ def test_find_consistency_group_by_id(self):
4848 'volume_types' : ['123456' ],
4949 }
5050 }
51- self .volume_sdk_client .get .side_effect = [
51+ self .volume_client .get .side_effect = [
5252 fakes .FakeResponse (data = data ),
5353 ]
5454
55- result = volume .find_consistency_group (self .volume_sdk_client , cg_id )
55+ result = volume .find_consistency_group (self .volume_client , cg_id )
5656
57- self .volume_sdk_client .get .assert_has_calls (
57+ self .volume_client .get .assert_has_calls (
5858 [
5959 mock .call (f'/consistencygroups/{ cg_id } ' ),
6060 ]
@@ -72,14 +72,14 @@ def test_find_consistency_group_by_name(self):
7272 }
7373 ],
7474 }
75- self .volume_sdk_client .get .side_effect = [
75+ self .volume_client .get .side_effect = [
7676 fakes .FakeResponse (status_code = http .HTTPStatus .NOT_FOUND ),
7777 fakes .FakeResponse (data = data ),
7878 ]
7979
80- result = volume .find_consistency_group (self .volume_sdk_client , cg_name )
80+ result = volume .find_consistency_group (self .volume_client , cg_name )
8181
82- self .volume_sdk_client .get .assert_has_calls (
82+ self .volume_client .get .assert_has_calls (
8383 [
8484 mock .call (f'/consistencygroups/{ cg_name } ' ),
8585 mock .call ('/consistencygroups' ),
@@ -89,14 +89,14 @@ def test_find_consistency_group_by_name(self):
8989
9090 def test_find_consistency_group_not_found (self ):
9191 data = {'consistencygroups' : []}
92- self .volume_sdk_client .get .side_effect = [
92+ self .volume_client .get .side_effect = [
9393 fakes .FakeResponse (status_code = http .HTTPStatus .NOT_FOUND ),
9494 fakes .FakeResponse (data = data ),
9595 ]
9696 self .assertRaises (
9797 osc_lib_exceptions .NotFound ,
9898 volume .find_consistency_group ,
99- self .volume_sdk_client ,
99+ self .volume_client ,
100100 'invalid-cg' ,
101101 )
102102
@@ -114,14 +114,14 @@ def test_find_consistency_group_by_name_duplicate(self):
114114 },
115115 ],
116116 }
117- self .volume_sdk_client .get .side_effect = [
117+ self .volume_client .get .side_effect = [
118118 fakes .FakeResponse (status_code = http .HTTPStatus .NOT_FOUND ),
119119 fakes .FakeResponse (data = data ),
120120 ]
121121
122122 self .assertRaises (
123123 osc_lib_exceptions .NotFound ,
124124 volume .find_consistency_group ,
125- self .volume_sdk_client ,
125+ self .volume_client ,
126126 cg_name ,
127127 )
0 commit comments