From 0d7a557396a74690cdfcf208c1fd7ed580d04161 Mon Sep 17 00:00:00 2001 From: Luca Benci Date: Wed, 18 Oct 2017 20:22:32 +0200 Subject: [PATCH] Fix configtypes tests so that placeholder is True --- tests/unit/config/test_configtypes.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py index d3a058935..7b77ef8f3 100644 --- a/tests/unit/config/test_configtypes.py +++ b/tests/unit/config/test_configtypes.py @@ -1815,12 +1815,12 @@ class TestShellCommand: @pytest.mark.parametrize('kwargs, val, expected', [ ({}, '[foobar]', ['foobar']), - ({'placeholder': '{}'}, '[foo, "{}", bar]', ['foo', '{}', 'bar']), - ({'placeholder': '{}'}, '["foo{}bar"]', ['foo{}bar']), - ({'placeholder': '{}'}, '[foo, "bar {}"]', ['foo', 'bar {}']), - ({'placeholder': '{file}'}, '[f, "{file}", b]', ['f', '{file}', 'b']), - ({'placeholder': '{file}'}, '["f{file}b"]', ['f{file}b']), - ({'placeholder': '{file}'}, '[f, "b {file}"]', ['f', 'b {file}']), + ({'placeholder': True}, '[foo, "{}", bar]', ['foo', '{}', 'bar']), + ({'placeholder': True}, '["foo{}bar"]', ['foo{}bar']), + ({'placeholder': True}, '[foo, "bar {}"]', ['foo', 'bar {}']), + ({'placeholder': True}, '[f, "{file}", b]', ['f', '{file}', 'b']), + ({'placeholder': True}, '["f{file}b"]', ['f{file}b']), + ({'placeholder': True}, '[f, "b {file}"]', ['f', 'b {file}']), ]) def test_valid(self, klass, kwargs, val, expected): cmd = klass(**kwargs) @@ -1828,10 +1828,10 @@ class TestShellCommand: assert cmd.to_py(expected) == expected @pytest.mark.parametrize('kwargs, val', [ - ({'placeholder': '{}'}, '[foo, bar]'), - ({'placeholder': '{}'}, '[foo, "{", "}", bar'), - ({'placeholder': '{file}'}, '[foo, bar]'), - ({'placeholder': '{file}'}, '[foo, "{fi", "le}", bar'), + ({'placeholder': True}, '[foo, bar]'), + ({'placeholder': True}, '[foo, "{", "}", bar'), + ({'placeholder': True}, '[foo, bar]'), + ({'placeholder': True}, '[foo, "{fi", "le}", bar'), ]) def test_from_str_invalid(self, klass, kwargs, val): with pytest.raises(configexc.ValidationError):