@@ -30,45 +30,63 @@ def test_gitlab_attribute_get():
3030assert o ._value is None
3131
3232
33- def test_csv_list_attribute_input ():
34- o = types .CommaSeparatedListAttribute ()
33+ def test_array_attribute_input ():
34+ o = types .ArrayAttribute ()
3535o .set_from_cli ("foo,bar,baz" )
3636assert o .get ()== ["foo" ,"bar" ,"baz" ]
3737
3838o .set_from_cli ("foo" )
3939assert o .get ()== ["foo" ]
4040
4141
42- def test_csv_list_attribute_empty_input ():
43- o = types .CommaSeparatedListAttribute ()
42+ def test_array_attribute_empty_input ():
43+ o = types .ArrayAttribute ()
4444o .set_from_cli ("" )
4545assert o .get ()== []
4646
4747o .set_from_cli (" " )
4848assert o .get ()== []
4949
5050
51- def test_csv_list_attribute_get_for_api_from_cli ():
52- o = types .CommaSeparatedListAttribute ()
51+ def test_array_attribute_get_for_api_from_cli ():
52+ o = types .ArrayAttribute ()
5353o .set_from_cli ("foo,bar,baz" )
5454assert o .get_for_api ()== "foo,bar,baz"
5555
5656
57- def test_csv_list_attribute_get_for_api_from_list ():
58- o = types .CommaSeparatedListAttribute (["foo" ,"bar" ,"baz" ])
57+ def test_array_attribute_get_for_api_from_list ():
58+ o = types .ArrayAttribute (["foo" ,"bar" ,"baz" ])
5959assert o .get_for_api ()== "foo,bar,baz"
6060
6161
62- def test_csv_list_attribute_get_for_api_from_int_list ():
63- o = types .CommaSeparatedListAttribute ([1 ,9 ,7 ])
62+ def test_array_attribute_get_for_api_from_int_list ():
63+ o = types .ArrayAttribute ([1 ,9 ,7 ])
6464assert o .get_for_api ()== "1,9,7"
6565
6666
67- def test_csv_list_attribute_does_not_split_string ():
68- o = types .CommaSeparatedListAttribute ("foo" )
67+ def test_array_attribute_does_not_split_string ():
68+ o = types .ArrayAttribute ("foo" )
6969assert o .get_for_api ()== "foo"
7070
7171
72+ # CommaSeparatedListAttribute tests
73+ def test_csv_string_attribute_get_for_api_from_cli ():
74+ o = types .CommaSeparatedListAttribute ()
75+ o .set_from_cli ("foo,bar,baz" )
76+ assert o .get_for_api ()== "foo,bar,baz"
77+
78+
79+ def test_csv_string_attribute_get_for_api_from_list ():
80+ o = types .CommaSeparatedListAttribute (["foo" ,"bar" ,"baz" ])
81+ assert o .get_for_api ()== "foo,bar,baz"
82+
83+
84+ def test_csv_string_attribute_get_for_api_from_int_list ():
85+ o = types .CommaSeparatedListAttribute ([1 ,9 ,7 ])
86+ assert o .get_for_api ()== "1,9,7"
87+
88+
89+ # LowercaseStringAttribute tests
7290def test_lowercase_string_attribute_get_for_api ():
7391o = types .LowercaseStringAttribute ("FOO" )
7492assert o .get_for_api ()== "foo"