"I had a test yesterday."
Translation:Ich hatte gestern eine Prüfung.
See here: http://en.wikibooks.org/wiki/German/Grammar/Sentences#Time "Ich hatte eine Prüfung gestern" is grammatically possible but sounds a bit unnatural. I'm not sure whether to call it "not idiomatic" or not. I guess you'll hear it sometimes from German speakers but to my ears it still sounds a bit flawed. Better put the 'gestern' at the beginning: 'Gestern hatte ich eine Prüfung'.
Your sentence looks fine otherwise. Perhaps you're right that Duo doesn't accept "Test"; I don't know for certain. A screenshot of your exercise and answer is generally the most helpful thing for figuring out this kind of thing, though I don't expect you took one.
(By the way, that's "typo," for "typographical error." :) )