Skip to content

Commit 5824448

Browse files
committed
feat: Add tests for PodmanConnectionError
Signed-off-by: Kanishk Pachauri <[email protected]>
1 parent 556901a commit 5824448

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

podman/tests/integration/test_system.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import podman.tests.integration.base as base
1818
from podman import PodmanClient
19-
from podman.errors import APIError
19+
from podman.errors import APIError, PodmanConnectionError
2020

2121

2222
class SystemIntegrationTest(base.IntegrationTest):
@@ -64,3 +64,8 @@ def test_login(self):
6464
def test_from_env(self):
6565
"""integration: from_env() no error"""
6666
PodmanClient.from_env()
67+
68+
def test_from_env_exceptions(self):
69+
"""integration: from_env() returns exceptions"""
70+
with self.assertRaises(PodmanConnectionError):
71+
PodmanClient.from_env(base_url="unix:///path/to/nonexistent.sock")

0 commit comments

Comments
 (0)