From 3a75d4fb397a2579ecf14ac9fb91fbfbe71cc845 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 25 Jul 2024 10:56:43 +0200 Subject: [PATCH] fix tests --- src/collective/feedback/tests/test_feedbacks_get.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/collective/feedback/tests/test_feedbacks_get.py b/src/collective/feedback/tests/test_feedbacks_get.py index b505567..6638c8c 100644 --- a/src/collective/feedback/tests/test_feedbacks_get.py +++ b/src/collective/feedback/tests/test_feedbacks_get.py @@ -37,7 +37,7 @@ def add_record(self, date=None, vote="", uid="", comment="", title=""): record.attrs["uid"] = uid if title: record.attrs["title"] = title - soup.add(record) + return soup.add(record) transaction.commit() def setUp(self): @@ -115,7 +115,7 @@ def test_endpoint_returns_data(self): res = response.json() self.assertEqual(res["items_total"], 0) now = datetime.now() - self.add_record(vote=1, comment="is ok", date=now) + id = self.add_record(vote=1, comment="is ok", date=now) response = self.api_session.get(self.url) res = response.json() @@ -126,6 +126,7 @@ def test_endpoint_returns_data(self): [ { "comments": 1, + "id": id, "last_vote": json_compatible(now), "title": "", "uid": "",