Procházet zdrojové kódy

Template.add param after test

pull/315/head
E. Seiver před 10 měsíci
rodič
revize
3332d62a98
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. +6
    -0
      tests/test_template.py

+ 6
- 0
tests/test_template.py Zobrazit soubor

@@ -334,6 +334,10 @@ def test_add():
node40.add("3", "d") node40.add("3", "d")
node41.add("3", "d") node41.add("3", "d")
node42.add("b", "hello") node42.add("b", "hello")
node43 = Template(wraptext("a"), [pgens("b", "c"), pgens("d", "e"), pgens("f", "g")])
node44 = Template(wraptext("a"), [pgens("b", "c"), pgens("d", "e"), pgens("f", "g")])
node43.add("new_param", "value", after="d")
node44.add("new_param", "value", after="f")


assert "{{a|b=c|d|e=f}}" == node1 assert "{{a|b=c|d|e=f}}" == node1
assert "{{a|b=c|d|g}}" == node2 assert "{{a|b=c|d|g}}" == node2
@@ -382,6 +386,8 @@ def test_add():
assert "{{a| b| c|d}}" == node40 assert "{{a| b| c|d}}" == node40
assert "{{a|1= b|2= c|3= d}}" == node41 assert "{{a|1= b|2= c|3= d}}" == node41
assert "{{a|b=hello \n}}" == node42 assert "{{a|b=hello \n}}" == node42
assert "{{a|b=c|d=e|new_param=value|f=g}}" == node43
assert "{{a|b=c|d=e|f=g|new_param=value}}" == node44




def test_remove(): def test_remove():


Načítá se…
Zrušit
Uložit