Skip to content

Commit

Permalink
Merge pull request #168 from plone/explicitacquisition-fixup-2
Browse files Browse the repository at this point in the history
Fixup tests: reset SKIP_PTA to whatever it was
  • Loading branch information
davisagli authored Oct 20, 2023
2 parents 5f98989 + 65a5394 commit 772e5b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/168.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix test leakage, enabling the publication check when it shouldn't be active. @jaroel
8 changes: 8 additions & 0 deletions src/plone/rest/tests/test_explicitacquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,18 @@ class TestExplicitAcquisitionAvailable(unittest.TestCase):
layer = PLONE_REST_INTEGRATION_TESTING

def setUp(self):
import Products.CMFCore.explicitacquisition

self.portal = self.layer["portal"]
self.request = self.layer["request"]
setRoles(self.portal, TEST_USER_ID, ["Manager"])
self.portal.invokeFactory("Document", id="foo")
self.PREVIOUS_SKIP_PTA = Products.CMFCore.explicitacquisition.SKIP_PTA

def tearDown(self):
import Products.CMFCore.explicitacquisition

Products.CMFCore.explicitacquisition.SKIP_PTA = self.PREVIOUS_SKIP_PTA

def traverse(self, path="/plone", accept="application/json", method="GET"):
request = self.layer["request"]
Expand Down

0 comments on commit 772e5b6

Please sign in to comment.