diff options
| author | Davanum Srinivas <dims@linux.vnet.ibm.com> | 2012-11-24 08:54:20 -0500 |
|---|---|---|
| committer | Davanum Srinivas <dims@linux.vnet.ibm.com> | 2012-11-24 08:54:59 -0500 |
| commit | f30587718a79755c3b59d9a0b680dd7f971cfdcd (patch) | |
| tree | 43ec21eaa1094aded14125f33183d1e3ab974de3 /tests/unit | |
| parent | 60ae013f43624e8ad1c19413a3744bdb91178224 (diff) | |
Fix ListOpt to trim whitespace
- throw in an extra strip() in the list parsing code
- add a test case to verify that it works!
Fixes LP #1079299
Change-Id: I4f0864c72ecd2569d0461c301acda395c87a93e0
Diffstat (limited to 'tests/unit')
| -rw-r--r-- | tests/unit/test_cfg.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/test_cfg.py b/tests/unit/test_cfg.py index 384a57a..bd9e914 100644 --- a/tests/unit/test_cfg.py +++ b/tests/unit/test_cfg.py @@ -219,6 +219,10 @@ class CliOptsTestCase(BaseTestCase): self._do_cli_test(ListOpt, None, ['--foo', 'blaa,bar'], ['blaa', 'bar']) + def test_list_arg_with_spaces(self): + self._do_cli_test(ListOpt, None, + ['--foo', 'blaa ,bar'], ['blaa', 'bar']) + def test_list_arg_deprecated(self): self._do_cli_test(ListOpt, None, ['--oldfoo', 'blaa,bar'], ['blaa', 'bar']) |
