1. Ralph Bean
  2. tw2.qrcode


tw2.qrcode / tests / test_widget.py

from tw.core.testutil import WidgetTestCase
from tw.qrcode import *

class TestWidget(WidgetTestCase):
    # place your widget at the TestWidget attribute
    TestWidget = Qrcode
    # Initilization args. go here 
    widget_kw = {}

    def test_render(self):
        # Asserts 'foo' and 'test' (the test widget's id) appear in rendered 
        # string when 'foo' is passed as value to render
        self.assertInOutput(['foo', 'test'], "foo")
        # Asserts 'ohlalala' does not appear in rendered string when render 
        # is called without args