kiwi-el8/test/unit/container/setup/docker_test.py
Alexandre Detiste fb69627ad3
Use unittest.mock from core python everywhere
mock was an independent module that has been merged into the Python standard library.
2024-02-18 22:15:30 +01:00

14 lines
407 B
Python

from unittest.mock import patch
from kiwi.container.setup.docker import ContainerSetupDocker
class TestContainerSetupDocker:
@patch('os.path.exists')
def test_init(self, mock_exists):
mock_exists.return_value = True
container = ContainerSetupDocker(
'root_dir', {'container_name': 'system'}
)
assert container.custom_args['container_name'] == 'system'