diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2020-04-09 00:13:36 +0200 |
---|---|---|
committer | Nejc Habjan <nejc.habjan@siemens.com> | 2020-08-22 19:30:21 +0200 |
commit | 11383e70f74c70e6fe8a56f18b5b170db982f402 (patch) | |
tree | 00b3524f6b64c612e26d48d7ad91b96a55923077 /gitlab/tests/test_exceptions.py | |
parent | 402566a665dfdf0862f15a7e59e4d804d1301c77 (diff) | |
download | gitlab-11383e70f74c70e6fe8a56f18b5b170db982f402.tar.gz |
chore: run unittest2pytest on all unit tests
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) |