'Asserts that a given field has an after and before addon.'

def assertFieldHasAddons(self, field):

    addon_before = u'bf'
    addon_after = u'af'
    res = render_template_with_form(u'{{%    bootstrap_field    form.{0}    addon_before="{1}"        addon_after="{2}"    %}}'.format(field, addon_before, addon_after))
    self.assertIn(u'class="input-group"', res)
    self.assertIn(u'class="input-group-addon">{0}'.format(addon_before), res)
    self.assertIn(u'class="input-group-addon">{0}'.format(addon_after), res)
