def widgets(self): self.input_group = InputGroup( P(self.web_fixture.view, text='before widget'), self.an_input, P(self.web_fixture.view, text='after widget')) self.expects_before_html = '<span class="input-group-prepend"><p class="input-group-text">before widget</p></span>' self.expects_after_html = '<span class="input-group-append"><p class="input-group-text">after widget</p></span>'
def plain_text(self): self.input_group = InputGroup('before text', self.an_input, 'after text') self.expects_before_html = '<span class="input-group-prepend"><span class="input-group-text">before text</span></span>' self.expects_after_html = '<span class="input-group-append"><span class="input-group-text">after text</span></span>'
def none_specified(self): self.input_group = InputGroup(None, self.an_input, None) self.expects_before_html = '' self.expects_after_html = ''
def widgets(self): self.input_group = InputGroup(P(self.view, text='before widget'), self.an_input, P(self.view, text='after widget')) self.expects_before_html = '<span class="input-group-addon"><p>before widget</p></span>' self.expects_after_html = '<span class="input-group-addon"><p>after widget</p></span>'