Esempio n. 1
0
    def test_check_swift_object_exist_client_exception_404(self,
                                                           mock_swift_client):
        e = ClientException(self.context.project_id)
        e.http_status = 404
        mock_swift_client.side_effect = e

        self.assertFalse(self.backup.check_swift_object_exist(self.context))
Esempio n. 2
0
 def test_check_swift_object_exist_client_exception_404(self):
     e = ClientException(self.context.tenant)
     e.http_status = 404
     with patch.object(remote, 'get_endpoint', return_value=None),\
         patch.object(remote, 'Connection',
                      side_effect=e):
         self.assertFalse(
             self.backup.check_swift_object_exist(self.context))
Esempio n. 3
0
 def test_check_swift_object_exist_client_exception_404(self):
     e = ClientException(self.context.tenant)
     e.http_status = 404
     with patch.object(remote, 'get_endpoint', return_value=None),\
         patch.object(remote, 'Connection',
                      side_effect=e):
         self.assertFalse(
             self.backup.check_swift_object_exist(self.context))