import pytest from util.config.provider import KubernetesConfigProvider from test.fixtures import * class TestKubernetesConfigProvider(KubernetesConfigProvider): def __init__(self): self.yaml_filename = 'yaml_filename' self._service_token = 'service_token' @pytest.mark.parametrize('directory,filename,expected', [ ("directory", "file", "directory_file"), ("directory/dir", "file", "directory/dir_file"), ("directory/dir/", "file", "directory/dir_file"), ("directory", "file/test", "directory_file/test"), ]) def test_get_volume_path(directory, filename, expected): provider = TestKubernetesConfigProvider() assert expected == provider.get_volume_path(directory, filename)