use better syntax for asserting that exception is thrown
raise a more appropriate Exception