Changed AssertionError's to ValueError's