Add pytest.raises for every test case