'Test that class-defined widget is not overwritten by __init__ (#22245).'

def test_integerfield_subclass(self):

    class MyIntegerField(IntegerField, ):
        widget = Textarea
    f = MyIntegerField()
    self.assertEqual(f.widget.__class__, Textarea)
    f = MyIntegerField(localize=True)
    self.assertEqual(f.widget.__class__, Textarea)
