Source

tw2.dyntext / tests / test_widget.py

Full commit
from tw2.core.testbase import  WidgetTest
from tw2.dyntext import DynamicTextWidget

class TestDemoWidget(WidgetTest):
    # place your widget at the TestWidget attribute
    widget = DynamicTextWidget

    # Initilization args. go here
    attrs = {'id' : 'affected_count'}
    params = {'data_url' : '/stats/affected_count'}
    expected = """<span id="affected_count"></span>"""