def test_read_integers_with_two_values(): """ Test given two values returns list containing two values. """ io_buffer = make_buffer('<list><value>0</value><value>1</value></list>') xml_reader = XmlReader(io_buffer) assert_equals(Reader.read_integers(xml_reader), [0, 1])
def test_read_integers_with_one_value(): """ Test given one value returns list containing one value. """ io_buffer = make_buffer('<list><value>0</value></list>') xml_reader = XmlReader(io_buffer) assert_equals(Reader.read_integers(xml_reader), [0])
def test_read_integers_empty_list_without_close_tag(): """ Test given no values without close tag returns empty list. """ io_buffer = make_buffer('<list/>') xml_reader = XmlReader(io_buffer) assert_equals(Reader.read_integers(xml_reader), [])
def test_read_integers_with_two_values(): """ Test given two values returns list containing two values. """ io_buffer = make_buffer('<list><value>0</value><value>1</value></list>') xml_reader = XmlReader(io_buffer) assert_equals(Reader.read_integers(xml_reader), [0, 1])
def test_read_integers_with_one_value(): """ Test given one value returns list containing one value. """ io_buffer = make_buffer('<list><value>0</value></list>') xml_reader = XmlReader(io_buffer) assert_equals(Reader.read_integers(xml_reader), [0])
def test_read_integers_empty_list_without_close_tag(): """ Test given no values without close tag returns empty list. """ io_buffer = make_buffer('<list/>') xml_reader = XmlReader(io_buffer) assert_equals(Reader.read_integers(xml_reader), [])