def test_valid_setting_boolean_value(self):
     line = "enabled = no"
     self.assertTupleEqual(config_parser.parse_setting_value(line),
                           ("enabled", False))
 def test_valid_list_value_with_space(self):
     line = "params = array, of, values"
     self.assertTupleEqual(config_parser.parse_setting_value(line),
                           ("params", ["array", "of", "values"]))
 def test_valid_setting_int_value(self):
     line = "basic_size_limit = 26214400"
     self.assertTupleEqual(config_parser.parse_setting_value(line),
                           ("basic_size_limit", 26214400))
 def test_valid_setting_value_with_override(self):
     line = "path<staging> = /srv/uploads/"
     self.assertTupleEqual(config_parser.parse_setting_value(line),
                           ("path<staging>", "/srv/uploads/"))
 def test_empty_string(self):
     line = "=1"
     self.assertTupleEqual(config_parser.parse_setting_value(line),
                           (None, None))
 def test_valid_setting_value_without_space(self):
     line = "path=/tmp/"
     self.assertTupleEqual(config_parser.parse_setting_value(line),
                           ("path", "/tmp/"))
 def test_invalid_setting_value(self):
     line = "[group]"
     self.assertTupleEqual(config_parser.parse_setting_value(line),
                           (None, None))