def assertUserPermissionMatrix(self, test_cases):
        actions = ['add', 'change', 'delete', 'frobnicate']
        for test_case in test_cases:
            user = test_case[0]
            expected_results = zip(actions, test_case[1:])

            for (action, expected_result) in expected_results:
                if expected_result:
                    self.assertTrue(
                        self.policy.user_has_permission(user, action),
                        "User %s should be able to %s, but can't" % (user, action)
                    )
                else:
                    self.assertFalse(
                        self.policy.user_has_permission(user, action),
                        "User %s should not be able to %s, but can" % (user, action)
                    )
Given a list of (user, can_add, can_change, can_delete, can_frobnicate) tuples
dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailcore/tests/test_permission_policies.py/PermissionPolicyTestUtils.assertUserPermissionMatrix