Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not test with visible_ids boolean property, as this may get removed. #88

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/125.tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Do not test with ``visible_ids`` boolean property, as this may get removed.
[maurits]
8 changes: 6 additions & 2 deletions src/Products/PlonePAS/tests/test_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ def setUp(self):
self.md = getToolByName(self.portal, "portal_memberdata")
self.gt = getToolByName(self.portal, "portal_groups")

# All existing boolean properties might get removed at some point,
# so add a new one for testing.
self.md.manage_addProperty("fluffy", False, "boolean")

# Create a new Member
self.mt.addMember(
"member1",
Expand Down Expand Up @@ -273,11 +277,11 @@ def testInexactStringSearch(self):
self.assertEqual(results, [])

def testBooleanSearch(self):
results = self.pas.searchUsers(visible_ids=True)
results = self.pas.searchUsers(fluffy=True)
results = [info["userid"] for info in results]
self.assertEqual(results, [])

results = self.pas.searchUsers(visible_ids=False)
results = self.pas.searchUsers(fluffy=False)
results = [info["userid"] for info in results]
self.assertEqual(results, ["member1", "member2"])

Expand Down