Skip to content

Commit

Permalink
fix(tests): use correct attribute to get exception
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Focko <[email protected]>
  • Loading branch information
mfocko committed Oct 12, 2023
1 parent 1328c14 commit 918245c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/integration/github/test_forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/pagure/test_forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 918245c

Please sign in to comment.