fix: fetch all odoo tickets deterministically

This commit is contained in:
2026-07-24 10:22:55 +02:00
parent b0fb879914
commit 7c108154df
6 changed files with 35 additions and 3 deletions
+4
View File
@@ -37,6 +37,8 @@ def make_config():
config.set("odoo", "username", "test@example.test")
config.set("odoo", "api_key", "test-api-key")
config.set("odoo", "model", "helpdesk.ticket")
config.set("odoo", "limit", "0")
config.set("odoo", "order", "id asc")
config.add_section("rocket")
config.set("rocket", "webhook_url", "https://rocket.example.test/webhook-test")
config.add_section("http")
@@ -163,6 +165,8 @@ class TicketingStateTest(unittest.TestCase):
post.call_args.kwargs["json"]["params"]["args"][6]["fields"],
["id", "name", "stage_id", "partner_id", "user_id", "write_date"],
)
self.assertEqual(post.call_args.kwargs["json"]["params"]["args"][6]["limit"], 0)
self.assertEqual(post.call_args.kwargs["json"]["params"]["args"][6]["order"], "id asc")
@patch("ticketing_setup.requests.post")
def test_fetch_odoo_tickets_rejects_jsonrpc_error(self, post):