@pytest.mark.django_db
def test_boolean_should_not_prevent_rendering_of_other_columns():
 class Table(tables.Table, ):
  boolean = tables.BooleanColumn(yesno=u'waar,onwaar')
  class Meta:
   model = Person
   fields = (u'boolean', u'name')
 (Occupation.objects.create(name=u'Waar', boolean=True),)
 (Occupation.objects.create(name=u'Onwaar', boolean=False),)
 Occupation.objects.create(name=u'Onduidelijk')
 html = Table(Occupation.objects.all()).as_html(build_request())
 assert (u'Waar' in html)
 assert (u'Onwaar' in html)

@ pytest . mark . django_db def test_boolean_should_not_prevent_rendering_of_other_columns ( ) : class Table ( tables . Table , ) : boolean = tables . BooleanColumn ( yesno = u'waar,onwaar' ) class Meta : model = Person fields = ( u'boolean' , u'name' ) ( Occupation . objects . create ( name = u'Waar' , boolean = True ) , ) ( Occupation . objects . create ( name = u'Onwaar' , boolean = False ) , ) Occupation . objects . create ( name = u'Onduidelijk' ) html = Table ( Occupation . objects . all ( ) ) . as_html ( build_request ( ) ) assert ( u'Waar' in html ) assert ( u'Onwaar' in html )
test for issue 360 .