'Test that BooleanField with choices and defaults doesn\'t generate a
formfield with the blank option (#9640, #10549).'

def test_booleanfield_choices_blank(self):

    choices = [(1, u'Si'), (2, u'No')]
    f = models.BooleanField(choices=choices, default=1, null=True)
    self.assertEqual(f.formfield().choices, ([(u'', u'---------')] + choices))
    f = models.BooleanField(choices=choices, default=1, null=False)
    self.assertEqual(f.formfield().choices, choices)
