File: docker_test.py

package info (click to toggle)
kiwi 10.2.36-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 7,664 kB
  • sloc: python: 69,179; sh: 4,228; xml: 3,383; ansic: 391; makefile: 353
file content (13 lines) | stat: -rw-r--r-- 407 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
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'