[#46283725] Optimized testing for test_anonymous_role