Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
folix-01 committed Jul 25, 2024
1 parent 469c0a5 commit 3a75d4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/collective/feedback/tests/test_feedbacks_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand All @@ -126,6 +126,7 @@ def test_endpoint_returns_data(self):
[
{
"comments": 1,
"id": id,
"last_vote": json_compatible(now),
"title": "",
"uid": "",
Expand Down

0 comments on commit 3a75d4f

Please sign in to comment.