diff --git a/src/collective/feedback/tests/test_feedbacks_get.py b/src/collective/feedback/tests/test_feedbacks_get.py index 6638c8c..193940a 100644 --- a/src/collective/feedback/tests/test_feedbacks_get.py +++ b/src/collective/feedback/tests/test_feedbacks_get.py @@ -117,6 +117,8 @@ def test_endpoint_returns_data(self): now = datetime.now() id = self.add_record(vote=1, comment="is ok", date=now) + transaction.commit() + response = self.api_session.get(self.url) res = response.json() @@ -160,6 +162,9 @@ def test_global_editor_can_see_all_data(self): comment="ok also for restricted", uid=self.restricted_document.UID(), ) + + transaction.commit() + api_session = RelativeSession(self.portal_url) api_session.headers.update({"Accept": "application/json"}) api_session.auth = ("global", "secret!!") @@ -180,6 +185,9 @@ def test_local_editor_can_see_only_data_for_his_contents(self): comment="ok also for restricted", uid=self.restricted_document.UID(), ) + + transaction.commit() + api_session = RelativeSession(self.portal_url) api_session.headers.update({"Accept": "application/json"}) api_session.auth = ("local", "secret!!") @@ -200,6 +208,8 @@ def test_only_admins_can_see_deleted_contents(self): uid="qwertyuiop", ) + transaction.commit() + response = self.api_session.get(self.url) res = response.json() self.assertEqual(res["items_total"], 2)