def test__add_list_param_extend(self): params = {"param1": "abc"} param_name = "param2" param_list = ["x", "y", "z"] evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual( { "param1": "abc", param_name: ",".join(param_list) }, params)
def test__add_list_param_none(self): params = {"param1": "abc"} param_name = "param2" param_list = None evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual({"param1": "abc"}, params)
def test__add_list_param_bad_type(self): params = {"param1": "abc"} param_name = "param2" param_list = "mystring" with self.assertRaises(TypeError): evergreen._add_list_param(params, param_name, param_list)
def test__add_list_param_no_list(self): params = {"param1": "abc"} param_name = "myparam" param_list = [] evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual({"param1": "abc"}, params)
def test__add_list_param_exists(self): params = {"param1": "abc"} param_name = "param1" param_list = ["x", "y", "z"] with self.assertRaises(RuntimeError): evergreen._add_list_param(params, param_name, param_list)
def test__add_list_param(self): params = {} param_name = "myparam" param_list = ["a", "b", "c"] evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual({param_name: ",".join(param_list)}, params)
def test__add_list_param_one_item(self): params = {} param_name = "myparam" param_list = ["abc"] evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual({param_name: "abc"}, params)
def test__add_list_param_bad_type(self): params = {"param1": "abc"} param_name = "param2" param_list = "mystring" with self.assertRaises(TypeError): evergreen._add_list_param(params, param_name, param_list)
def test__add_list_param_none(self): params = {"param1": "abc"} param_name = "param2" param_list = None evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual({"param1": "abc"}, params)
def test__add_list_param_extend(self): params = {"param1": "abc"} param_name = "param2" param_list = ["x", "y", "z"] evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual({"param1": "abc", param_name: ",".join(param_list)}, params)
def test__add_list_param_exists(self): params = {"param1": "abc"} param_name = "param1" param_list = ["x", "y", "z"] with self.assertRaises(RuntimeError): evergreen._add_list_param(params, param_name, param_list)
def test__add_list_param_no_list(self): params = {"param1": "abc"} param_name = "myparam" param_list = [] evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual({"param1": "abc"}, params)
def test__add_list_param_one_item(self): params = {} param_name = "myparam" param_list = ["abc"] evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual({param_name: "abc"}, params)
def test__add_list_param(self): params = {} param_name = "myparam" param_list = ["a", "b", "c"] evergreen._add_list_param(params, param_name, param_list) self.assertDictEqual({param_name: ",".join(param_list)}, params)