FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/gitlab/tests/test_exceptions.py at master · klorenz/python-gitlab · GitHub
klorenz
python-gitlab
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-gitlab
/
gitlab
/
tests
/
test_exceptions.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (12 loc) · 499 Bytes
Breadcrumbs
python-gitlab
/
gitlab
/
tests
/
test_exceptions.py
Copy path
File metadata and controls
18 lines (12 loc) · 499 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import
pytest
from
gitlab
import
exceptions
def
test_error_raises_from_http_error
():
"""Methods decorated with @on_http_error should raise from GitlabHttpError."""
class
TestError
(
Exception
):
pass
@
exceptions
.
on_http_error
(
TestError
)
def
raise_error_from_http_error
():
raise
exceptions
.
GitlabHttpError
with
pytest
.
raises
(
TestError
)
as
context
:
raise_error_from_http_error
()
assert
isinstance
(
context
.
value
.
__cause__
,
exceptions
.
GitlabHttpError
)
Back
|
FazBrowse Home
|
New Git URL