Skip to content

Commit

Permalink
feat: Add tests for PodmanConnectionError
Browse files Browse the repository at this point in the history
Signed-off-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
  • Loading branch information
Mr-Sunglasses committed Feb 16, 2025
1 parent 556901a commit 5824448
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion podman/tests/integration/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import podman.tests.integration.base as base
from podman import PodmanClient
from podman.errors import APIError
from podman.errors import APIError, PodmanConnectionError


class SystemIntegrationTest(base.IntegrationTest):
Expand Down Expand Up @@ -64,3 +64,8 @@ def test_login(self):
def test_from_env(self):
"""integration: from_env() no error"""
PodmanClient.from_env()

def test_from_env_exceptions(self):
"""integration: from_env() returns exceptions"""
with self.assertRaises(PodmanConnectionError):
PodmanClient.from_env(base_url="unix:///path/to/nonexistent.sock")

0 comments on commit 5824448

Please sign in to comment.