def test_post_delete_duplicate(self):
        """Cancels an execution twice, to ensure that a full execution object
        is returned instead of an error message
        """

        post_resp = self._do_post(LIVE_ACTION_1)
        self.assertEqual(post_resp.status_int, 201)

        # Similar to test_post_delete, only twice
        for i in range(2):
            delete_resp = self._do_delete(self._get_actionexecution_id(post_resp))
            self.assertEqual(delete_resp.status_int, 200)
            self.assertEqual(delete_resp.json["status"], "canceled")
            expected_result = {
                "message": "Action canceled by user.",
                "user": cfg.CONF.system_user.user,
            }
            self.assertDictEqual(delete_resp.json["result"], expected_result)
Cancels an execution twice, to ensure that a full execution object
        is returned instead of an error message
        
st2api/tests/unit/controllers/v1/test_executions.py