I think assertRaises is what you want to have here. I don't think current try-except phrase would test anything.