'Introspection of column names consist/start with digits (#16536/#17676)'

def test_digits_column_name_introspection(self):

    out = StringIO()
    call_command(u'inspectdb', table_name_filter=(lambda tn: tn.startswith(u'inspectdb_')), stdout=out)
    output = out.getvalue()
    error_message = u'inspectdb    generated    a    model    field    name    which    is    a    number'
    self.assertNotIn(u'                123    =    models.CharField', output, msg=error_message)
    self.assertIn(u'number_123    =    models.CharField', output)
    error_message = u'inspectdb    generated    a    model    field    name    which    starts    with    a    digit'
    self.assertNotIn(u'                4extra    =    models.CharField', output, msg=error_message)
    self.assertIn(u'number_4extra    =    models.CharField', output)
    self.assertNotIn(u'                45extra    =    models.CharField', output, msg=error_message)
    self.assertIn(u'number_45extra    =    models.CharField', output)
