Taking a quiz or exam in a dream can be a type of initiation to examine whether your beliefs are serving you in a productive way. If you are late for the test and therefore fail, your own insecurities are undermining your ability for success. A person doesn't succeed in life if they believe they will fail. Failure is a prerequisite for success. All accomplishments are achieved after a series of trials that include missing the mark. If you have suddenly forgotten what the material is about, you are being given the opportunity to let your old way of thinking go.
Being quizzed by an unusual character can also be the activation of the Trickster archetype. You are tripped up in your inconsistencies of thought, so that you can start with a fresh perspective. The quiz measures what you know - and sometimes it is better not to know so that you can discover.