Example testcase format python
From MediaWiki extension testing
A testset as a python file. UTF8-encoding RECOMMENDED. MAY contain all elements, MUST contain name, code, expect. All other elements MAY be present, but will be ignored by the testbot.
See also : Syntax testcase
#!/usr/bin/python
from exttest import Test
tests=[
Test(
name="{{SERVER}} directive",
code="{{SERVER}} yet another test",
expect='<a href="http://83.149.110.226" class="external free" ti
tle="http://83.149.110.226" rel="nofollow">http://83.149.110.226</a> yet another
test'
),
Test(
name="plain text",
code="test",
expect="test"
),
Test(
name="normal wikilink",
code="[[hello]]",
expect='<a href="/index.php?title=Hello&action=edit" class="
new" title="Hello">hello</a>'
)
]