Example #1
0
 def test_as_list(self):
     config_option = settings.ConfigOption('namespace', 'help_message')
     self.assertEqual(config_option._as_list(''), [])
     self.assertEqual(config_option._as_list('[]'), [])
     self.assertEqual(2, len(config_option._as_list('["foo", "bar", ]')))
Example #2
0
 def test_as_list_fails(self):
     with self.assertRaises(ValueError):
         config_option = settings.ConfigOption('namespace', 'help_message')
         config_option._as_list(None)
Example #3
0
 def test_as_list(self):
     config_option = settings.ConfigOption("namespace", "help_message")
     self.assertEqual(config_option._as_list(""), [])
     self.assertEqual(config_option._as_list("[]"), [])
     self.assertEqual(2, len(config_option._as_list('["foo", "bar", ]')))