def test_col_types(self):
    (columns, primary_keys, foreign_keys, model_names, indexes) = self.introspector.introspect()
    expected = (('col_types', (('f1', (BigIntegerField, IntegerField), False), ('f2', (BlobField, TextField), False), ('f3', (BooleanField, IntegerField), False), ('f4', CharField, False), ('f5', DateField, False), ('f6', DateTimeField, False), ('f7', DecimalField, False), ('f8', (DoubleField, FloatField), False), ('f9', FloatField, False), ('f10', IntegerField, False), ('f11', AutoField, False), ('f12', TextField, False), ('f13', TimeField, False))), ('rel_model', (('col_types_id', ForeignKeyField, False), ('col_types_nullable_id', ForeignKeyField, True))), ('nugget', (('category_id', ForeignKeyField, False), ('category', CharField, False))), ('nullable', (('nullable_cf', CharField, True), ('nullable_if', IntegerField, True))), ('fkpk', (('col_types_id', ForeignKeyField, False),)), ('underscores', (('_id', AutoField, False), ('_name', CharField, False))), ('category', (('name', CharField, False), ('parent_id', ForeignKeyField, True))))
    for (table_name, expected_columns) in expected:
        introspected_columns = columns[table_name]
        for (field_name, field_class, is_null) in expected_columns:
            if (not isinstance(field_class, (list, tuple))):
                field_class = (field_class,)
            column = introspected_columns[field_name]
            self.assertTrue((column.field_class in field_class), ('%s in %s' % (column.field_class, field_class)))
            self.assertEqual(column.nullable, is_null)
def test_col_types(self):
    (columns, primary_keys, foreign_keys, model_names, indexes) = self.introspector.introspect()
    expected = (('col_types', (('f1', (BigIntegerField, IntegerField), False), ('f2', (BlobField, TextField), False), ('f3', (BooleanField, IntegerField), False), ('f4', CharField, False), ('f5', DateField, False), ('f6', DateTimeField, False), ('f7', DecimalField, False), ('f8', (DoubleField, FloatField), False), ('f9', FloatField, False), ('f10', IntegerField, False), ('f11', AutoField, False), ('f12', TextField, False), ('f13', TimeField, False))), ('rel_model', (('col_types_id', ForeignKeyField, False), ('col_types_nullable_id', ForeignKeyField, True))), ('nugget', (('category_id', ForeignKeyField, False), ('category', CharField, False))), ('nullable', (('nullable_cf', CharField, True), ('nullable_if', IntegerField, True))), ('fkpk', (('col_types_id', ForeignKeyField, False),)), ('underscores', (('_id', AutoField, False), ('_name', CharField, False))), ('category', (('name', CharField, False), ('parent_id', ForeignKeyField, True))))
    for (table_name, expected_columns) in expected:
        introspected_columns = columns[table_name]
        for (field_name, field_class, is_null) in expected_columns:
            if (not isinstance(field_class, (list, tuple))):
                field_class = (field_class,)
            column = introspected_columns[field_name]
            self.assertTrue((column.field_class in field_class), ('%s in %s' % (column.field_class, field_class)))
            self.assertEqual(column.nullable, is_null)