diff options
Diffstat (limited to 'gitlab/tests/test_exceptions.py')
-rw-r--r-- | gitlab/tests/test_exceptions.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gitlab/tests/test_exceptions.py b/gitlab/tests/test_exceptions.py index 1f00af0..57622c0 100644 --- a/gitlab/tests/test_exceptions.py +++ b/gitlab/tests/test_exceptions.py @@ -1,6 +1,7 @@ import unittest from gitlab import exceptions +import pytest class TestExceptions(unittest.TestCase): @@ -14,6 +15,6 @@ class TestExceptions(unittest.TestCase): def raise_error_from_http_error(): raise exceptions.GitlabHttpError - with self.assertRaises(TestError) as context: + with pytest.raises(TestError) as context: raise_error_from_http_error() - self.assertIsInstance(context.exception.__cause__, exceptions.GitlabHttpError) + assert isinstance(context.value.__cause__, exceptions.GitlabHttpError) |