I doubt that this scenario happens very often. Correct me if I'm wrong, but testing is a way that dojo's or perhaps the greater organization as a whole get's alot of its income. If this isn't the case, then why aren't ranks always awarded without the test and its fees?? I'm sure most sensei's have a good idea of what level their students are at through day to day training, and probably don't recommend that one tests until they know that they are ready. So why not just say "ta daa, you're now kyu or dan number x"??