diff --git a/tests/integration/github/test_forks.py b/tests/integration/github/test_forks.py index 16970e9b..b9778aea 100644 --- a/tests/integration/github/test_forks.py +++ b/tests/integration/github/test_forks.py @@ -22,7 +22,7 @@ def test_nonexisting_fork(self): ) with pytest.raises(GithubAPIException) as ex: self.ogr_nonexisting_fork.get_description() - s = str(ex.exception.__cause__) + s = str(ex.value.__cause__) assert "Not Found" in s assert "404" in s diff --git a/tests/integration/pagure/test_forks.py b/tests/integration/pagure/test_forks.py index a8337b3e..76ff2405 100644 --- a/tests/integration/pagure/test_forks.py +++ b/tests/integration/pagure/test_forks.py @@ -41,7 +41,7 @@ def test_nonexisting_fork(self): assert not ogr_project_non_existing_fork.exists() with pytest.raises(PagureAPIException) as ex: ogr_project_non_existing_fork.get_description() - assert "Project not found" in ex.exception.pagure_error + assert "Project not found" in ex.value.pagure_error def test_fork_property(self): fork = self.ogr_project.get_fork()