this should use pytest.raises