@@ -118,8 +118,8 @@ def test_project_purge_with_project(self):
118118 self .projects_mock .delete .assert_called_once_with (self .project .id )
119119 self .servers_mock .list .assert_called_once_with (
120120 search_opts = {'tenant_id' : self .project .id })
121- self .images_mock . list . assert_called_once_with (
122- owner = self .project . id )
121+ kwargs = { 'filters' : { 'owner' : self .project . id }}
122+ self .images_mock . list . assert_called_once_with ( ** kwargs )
123123 volume_search_opts = {'project_id' : self .project .id }
124124 self .volumes_mock .list .assert_called_once_with (
125125 search_opts = volume_search_opts )
@@ -153,8 +153,8 @@ def test_project_purge_with_dry_run(self):
153153 self .projects_mock .delete .assert_not_called ()
154154 self .servers_mock .list .assert_called_once_with (
155155 search_opts = {'tenant_id' : self .project .id })
156- self .images_mock . list . assert_called_once_with (
157- owner = self .project . id )
156+ kwargs = { 'filters' : { 'owner' : self .project . id }}
157+ self .images_mock . list . assert_called_once_with ( ** kwargs )
158158 volume_search_opts = {'project_id' : self .project .id }
159159 self .volumes_mock .list .assert_called_once_with (
160160 search_opts = volume_search_opts )
@@ -188,8 +188,8 @@ def test_project_purge_with_keep_project(self):
188188 self .projects_mock .delete .assert_not_called ()
189189 self .servers_mock .list .assert_called_once_with (
190190 search_opts = {'tenant_id' : self .project .id })
191- self .images_mock . list . assert_called_once_with (
192- owner = self .project . id )
191+ kwargs = { 'filters' : { 'owner' : self .project . id }}
192+ self .images_mock . list . assert_called_once_with ( ** kwargs )
193193 volume_search_opts = {'project_id' : self .project .id }
194194 self .volumes_mock .list .assert_called_once_with (
195195 search_opts = volume_search_opts )
@@ -224,8 +224,8 @@ def test_project_purge_with_auth_project(self):
224224 self .projects_mock .delete .assert_called_once_with (self .project .id )
225225 self .servers_mock .list .assert_called_once_with (
226226 search_opts = {'tenant_id' : self .project .id })
227- self .images_mock . list . assert_called_once_with (
228- owner = self .project . id )
227+ kwargs = { 'filters' : { 'owner' : self .project . id }}
228+ self .images_mock . list . assert_called_once_with ( ** kwargs )
229229 volume_search_opts = {'project_id' : self .project .id }
230230 self .volumes_mock .list .assert_called_once_with (
231231 search_opts = volume_search_opts )
@@ -260,8 +260,8 @@ def test_project_purge_with_exception(self, mock_error):
260260 self .projects_mock .delete .assert_called_once_with (self .project .id )
261261 self .servers_mock .list .assert_called_once_with (
262262 search_opts = {'tenant_id' : self .project .id })
263- self .images_mock . list . assert_called_once_with (
264- owner = self .project . id )
263+ kwargs = { 'filters' : { 'owner' : self .project . id }}
264+ self .images_mock . list . assert_called_once_with ( ** kwargs )
265265 volume_search_opts = {'project_id' : self .project .id }
266266 self .volumes_mock .list .assert_called_once_with (
267267 search_opts = volume_search_opts )
@@ -296,8 +296,8 @@ def test_project_purge_with_force_delete_backup(self):
296296 self .projects_mock .delete .assert_called_once_with (self .project .id )
297297 self .servers_mock .list .assert_called_once_with (
298298 search_opts = {'tenant_id' : self .project .id })
299- self .images_mock . list . assert_called_once_with (
300- owner = self .project . id )
299+ kwargs = { 'filters' : { 'owner' : self .project . id }}
300+ self .images_mock . list . assert_called_once_with ( ** kwargs )
301301 volume_search_opts = {'project_id' : self .project .id }
302302 self .volumes_mock .list .assert_called_once_with (
303303 search_opts = volume_search_opts )
0 commit comments