Tower: upload queue_job 16.0.2.12.0 (via marketplace)
This commit is contained in:
17
addons/queue_job/tests/test_run_rob_controller.py
Normal file
17
addons/queue_job/tests/test_run_rob_controller.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo.tests.common import TransactionCase
|
||||||
|
|
||||||
|
from ..controllers.main import RunJobController
|
||||||
|
from ..job import Job
|
||||||
|
|
||||||
|
|
||||||
|
class TestRunJobController(TransactionCase):
|
||||||
|
def test_get_failure_values(self):
|
||||||
|
method = self.env["res.users"].mapped
|
||||||
|
job = Job(method)
|
||||||
|
ctrl = RunJobController()
|
||||||
|
rslt = ctrl._get_failure_values(job, "info", Exception("zero", "one"))
|
||||||
|
self.assertEqual(
|
||||||
|
rslt, {"exc_info": "info", "exc_name": "Exception", "exc_message": "zero"}
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user