I am sure each dojo has its own set of rules or guidelines determining when one is "prepared" to test.
But most Sensei I know are caring people. They would not allow a student to test if that student has not demonstrated in class that she/he is "prepared". Sensei does not want her/his students to fail.
One of the basic attitudes I have found in every dojo I have visited is one of harmony and helpfulness. A good Sensei would not knowingly allow a student to test if the student has not shown in class that she/he can meet the mental and physical requirements.
Each day, we perform at different levels in any task we are involved in. Some days in class we feel like a gentle spring breeze on a sunny cloudless day. Then, other days in class, like a leaf caught in a hurricane being blown with no control or direction.
Sensei knows our ability and areas that we are lacking. So, if on "test day" we feel we could have done better.....that feeling is perhaps true...probably true....but we could have done not as good also.
Use the feelings as a book from which to learn..