Skip to content

Commit 2d31c74

Browse files
committed
chore: add test for credentials parsing
1 parent 2a48690 commit 2d31c74

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

requirements-dev.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
keyring
12
mock
23
pip-tools
34
pytest
45
pytest-cov
5-
responses
6+
responses

requirements-dev.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,20 @@ idna==3.10
1818
# via requests
1919
iniconfig==2.1.0
2020
# via pytest
21+
jaraco-classes==3.4.0
22+
# via keyring
23+
jaraco-context==6.0.1
24+
# via keyring
25+
jaraco-functools==4.2.1
26+
# via keyring
27+
keyring==25.6.0
28+
# via -r requirements-dev.in
2129
mock==5.2.0
2230
# via -r requirements-dev.in
31+
more-itertools==10.7.0
32+
# via
33+
# jaraco-classes
34+
# jaraco-functools
2335
packaging==25.0
2436
# via
2537
# build

test/test_cloud_manager.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
import json
22

3+
import pytest
34
import responses
5+
46
from conftest import Mock
7+
from upcloud_api import CloudManager
8+
from upcloud_api.errors import UpCloudClientError
59

610

711
class TestCloudManagerBasic:
12+
def test_no_credentials(self):
13+
with pytest.raises(UpCloudClientError):
14+
CloudManager()
15+
816
@responses.activate
917
def test_get_account(self, manager):
1018
data = Mock.mock_get("account")

0 commit comments

Comments
 (0)