def testPermissionError(self):

        db = current.db
        auth = current.auth
        s3db = current.s3db
        deployment_settings = current.deployment_settings

        # Anonymous
        auth.override = False
        auth.s3_impersonate(None)

        with self.assertRaises(current.auth.permission.error):
            self.resource.merge(self.id1, self.id2)

        # Check for proper rollback
        ptable = s3db.pr_person
        query = ptable._id.belongs((self.id1, self.id2))
        rows = db(query).select(ptable._id, limitby=(0, 2))
        self.assertEqual(len(rows), 0)

    # -------------------------------------------------------------------------
Check for exception if not authorized
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3resource.py/MergePersonsTests.testPermissionError