Skip to content

Commit

Permalink
fix test for 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pbauer committed Feb 28, 2024
1 parent 7e05996 commit ec23a32
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/collective/exportimport/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,14 @@ def test_export_indirect_members(self):
data = json.loads(contents)
self.assertIn("groups", data.keys())
self.assertIn("members", data.keys())
member_data = data["members"][0]
self.assertEqual(member_data["username"], TEST_USER_ID)
# Only direct membership is exported
self.assertEqual(member_data["groups"], ["Direct"])
members = data["members"]
membernames = [member["username"] for member in members]
self.assertIn(TEST_USER_ID, membernames)
for member in members:
if member["username"] == TEST_USER_ID:
self.assertEqual(member["username"], TEST_USER_ID)
# Only direct membership is exported
self.assertEqual(member["groups"], ["Direct"])

def test_export_defaultpages_empty(self):
browser = self.open_page("@@export_defaultpages")
Expand Down

0 comments on commit ec23a32

Please sign in to comment.