Refactor assert_raises
Use test_raises from utils