Thanks. "When we have a test?" is what Google Translator told me, but it didn't seem correct, so I wanted to make sure. Apparently, Google Translator lied to me again.
But "Do you know when we have a test?" is correct?
Welcome to Using English.
Yes, that one is correct. The part that asks "Do you know..." makes the "when we have a test" part go back to the normal order of subject/verb
When we have a test in math class, the teacher makes us hand in our cell phones so we don't use the calculator function.
When do we have a test in math?
We have a test in math tomorrow.
Do you know when we have our next test in math?
Yes, I know when we have our next test in math. Our next test in math is tomorrow.
We didn't have the quiz the teacher told us to expect yesterday. I expect we will have a quiz today instead.