diff --git a/tests/filemon/test_config.py b/tests/filemon/test_config.py index 1434fe034314d8e8b6a7fcd3ec536377884f6a27..da3f68e18cbbffae288fafd103fcea965a4421e0 100644 --- a/tests/filemon/test_config.py +++ b/tests/filemon/test_config.py @@ -249,57 +249,3 @@ class TestLoadLegacyProfiles(TestCase): self.config.remove_option(u'rattail.filemon', u'foo.actions') monitored = config.load_legacy_profiles(self.config) self.assertEqual(len(monitored), 1) - - -class TestParseList(TestCase): - - def test_none(self): - value = config.parse_list(None) - self.assertEqual(len(value), 0) - - def test_single_value(self): - value = config.parse_list(u'foo') - self.assertEqual(len(value), 1) - self.assertEqual(value[0], u'foo') - - def test_single_value_padded_by_spaces(self): - value = config.parse_list(u' foo ') - self.assertEqual(len(value), 1) - self.assertEqual(value[0], u'foo') - - def test_slash_is_not_a_separator(self): - value = config.parse_list(u'/dev/null') - self.assertEqual(len(value), 1) - self.assertEqual(value[0], u'/dev/null') - - def test_multiple_values_separated_by_whitespace(self): - value = config.parse_list(u'foo bar baz') - self.assertEqual(len(value), 3) - self.assertEqual(value[0], u'foo') - self.assertEqual(value[1], u'bar') - self.assertEqual(value[2], u'baz') - - def test_multiple_values_separated_by_commas(self): - value = config.parse_list(u'foo,bar,baz') - self.assertEqual(len(value), 3) - self.assertEqual(value[0], u'foo') - self.assertEqual(value[1], u'bar') - self.assertEqual(value[2], u'baz') - - def test_multiple_values_separated_by_whitespace_and_commas(self): - value = config.parse_list(u' foo, bar baz') - self.assertEqual(len(value), 3) - self.assertEqual(value[0], u'foo') - self.assertEqual(value[1], u'bar') - self.assertEqual(value[2], u'baz') - - def test_multiple_values_separated_by_whitespace_and_commas_with_some_quoting(self): - value = config.parse_list(u""" - foo - "C:\\some path\\with spaces\\and, a comma", - baz -""") - self.assertEqual(len(value), 3) - self.assertEqual(value[0], u'foo') - self.assertEqual(value[1], u'C:\\some path\\with spaces\\and, a comma') - self.assertEqual(value[2], u'baz')