INNER CODE UNIT · Python
test_set_string_array
connectbot/connectbot · translations/test_translate.py:139
def test_set_string_array(self):
source = parse(
"<string-array name='x'>"
"<item>One</item><item>Two</item>"
"</string-array>"
)
target = parse(
"<string-array name='x'>"
"<item>Eins</item><item>Zwei</item>"
"</string-array>"
)
set_element_text(target, "Uno\nDos", source)
items = target.findall("item")
assert [i.text for i in items] == ["Uno", "Dos"]
def test_set_plurals_preserves_item_attributes(self):
source = parse(
"<plurals name='x'>"