Tests use updated get_config_paths_from_options signature

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2016-03-07 17:46:55 -08:00
parent 5831b869e8
commit fd020ed2cf
2 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@
- id: end-of-file-fixer - id: end-of-file-fixer
- id: flake8 - id: flake8
- id: name-tests-test - id: name-tests-test
exclude: 'tests/integration/testcases\.py' exclude: 'tests/(integration/testcases\.py|helpers\.py)'
- id: requirements-txt-fixer - id: requirements-txt-fixer
- id: trailing-whitespace - id: trailing-whitespace
- repo: git://github.com/asottile/reorder_python_imports - repo: git://github.com/asottile/reorder_python_imports

View File

@ -15,24 +15,24 @@ class TestGetConfigPathFromOptions(object):
def test_path_from_options(self): def test_path_from_options(self):
paths = ['one.yml', 'two.yml'] paths = ['one.yml', 'two.yml']
opts = {'--file': paths} opts = {'--file': paths}
assert get_config_path_from_options(opts) == paths assert get_config_path_from_options('.', opts) == paths
def test_single_path_from_env(self): def test_single_path_from_env(self):
with mock.patch.dict(os.environ): with mock.patch.dict(os.environ):
os.environ['COMPOSE_FILE'] = 'one.yml' os.environ['COMPOSE_FILE'] = 'one.yml'
assert get_config_path_from_options({}) == ['one.yml'] assert get_config_path_from_options('.', {}) == ['one.yml']
@pytest.mark.skipif(IS_WINDOWS_PLATFORM, reason='posix separator') @pytest.mark.skipif(IS_WINDOWS_PLATFORM, reason='posix separator')
def test_multiple_path_from_env(self): def test_multiple_path_from_env(self):
with mock.patch.dict(os.environ): with mock.patch.dict(os.environ):
os.environ['COMPOSE_FILE'] = 'one.yml:two.yml' os.environ['COMPOSE_FILE'] = 'one.yml:two.yml'
assert get_config_path_from_options({}) == ['one.yml', 'two.yml'] assert get_config_path_from_options('.', {}) == ['one.yml', 'two.yml']
@pytest.mark.skipif(not IS_WINDOWS_PLATFORM, reason='windows separator') @pytest.mark.skipif(not IS_WINDOWS_PLATFORM, reason='windows separator')
def test_multiple_path_from_env_windows(self): def test_multiple_path_from_env_windows(self):
with mock.patch.dict(os.environ): with mock.patch.dict(os.environ):
os.environ['COMPOSE_FILE'] = 'one.yml;two.yml' os.environ['COMPOSE_FILE'] = 'one.yml;two.yml'
assert get_config_path_from_options({}) == ['one.yml', 'two.yml'] assert get_config_path_from_options('.', {}) == ['one.yml', 'two.yml']
def test_no_path(self): def test_no_path(self):
assert not get_config_path_from_options({}) assert not get_config_path_from_options('.', {})