def METHOD_NAME(self):
    self.login_test1()
    d = self.create_doc(settings={"exam_mode": "view", "cache": True})
    # The nocache is just for making sure there's no previous doc cache when rerunning this same test from IDE.
    # The doc id is always the same because the DB starts fresh.
    self.get(d.url, query_string={"nocache": True})
    self.test_user_2.grant_access(d, AccessType.view)
    db.session.commit()
    self.get(
        f"/generateCache/{d.path}",
    )
    self.login_test2()
    r = self.get(d.url, as_tree=True)
    self.assert_js_variable(r, "exam_mode", True)
    rights = self.get_js_variable(r, "curr_item")["rights"]
    self.assertEqual(
        {
            "browse_own_answers": True,
            "can_comment": True,
            "can_mark_as_read": True,
            "copy": False,
            "editable": False,
            "manage": False,
            "owner": False,
            "see_answers": False,
            "teacher": False,
        },
        rights,
    )
    rights = self.get_js_variable(r, "translations")[0]["rights"]
    self.assertEqual(
        {
            "browse_own_answers": True,
            "can_comment": True,
            "can_mark_as_read": True,
            "copy": False,
            "editable": False,
            "manage": False,
            "owner": False,
            "see_answers": False,
            "teacher": False,
        },
        rights,
    )