Source

fromtw.core.testutilimportWidgetTestCasefromtw.jqpluginsimport*classTestWidget(WidgetTestCase):# place your widget at the TestWidget attributeTestWidget=Jqplugins# Initilization args. go here widget_kw={}deftest_render(self):# Asserts 'foo' and 'test' (the test widget's id) appear in rendered # string when 'foo' is passed as value to renderself.assertInOutput(['foo','test'],"foo")# Asserts 'ohlalala' does not appear in rendered string when render # is called without argsself.assertNotInOutput(['ohlalala'])