def test_column_meta(self):
    (columns, primary_keys, foreign_keys, model_names, indexes) = self.introspector.introspect()
    rel_model = columns['rel_model']
    col_types_id = rel_model['col_types_id']
    self.assertEqual(col_types_id.get_field_parameters(), {'column_name': "'col_types_id'", 'model': 'ColTypes', 'field': "'f11'"})
    col_types_nullable_id = rel_model['col_types_nullable_id']
    self.assertEqual(col_types_nullable_id.get_field_parameters(), {'column_name': "'col_types_nullable_id'", 'null': True, 'backref': "'col_types_col_types_nullable_set'", 'model': 'ColTypes', 'field': "'f11'"})
    fkpk = columns['fkpk']
    self.assertEqual(fkpk['col_types_id'].get_field_parameters(), {'column_name': "'col_types_id'", 'model': 'ColTypes', 'primary_key': True, 'field': "'f11'"})
    category = columns['category']
    parent_id = category['parent_id']
    self.assertEqual(parent_id.get_field_parameters(), {'column_name': "'parent_id'", 'null': True, 'model': "'self'", 'field': "'id'"})
    nugget = columns['nugget']
    category_fk = nugget['category_id']
    self.assertEqual(category_fk.name, 'category_id')
    self.assertEqual(category_fk.get_field_parameters(), {'field': "'id'", 'model': 'Category', 'column_name': "'category_id'"})
    category = nugget['category']
    self.assertEqual(category.name, 'category')
def test_column_meta(self):
    (columns, primary_keys, foreign_keys, model_names, indexes) = self.introspector.introspect()
    rel_model = columns['rel_model']
    col_types_id = rel_model['col_types_id']
    self.assertEqual(col_types_id.get_field_parameters(), {'column_name': "'col_types_id'", 'model': 'ColTypes', 'field': "'f11'"})
    col_types_nullable_id = rel_model['col_types_nullable_id']
    self.assertEqual(col_types_nullable_id.get_field_parameters(), {'column_name': "'col_types_nullable_id'", 'null': True, 'backref': "'col_types_col_types_nullable_set'", 'model': 'ColTypes', 'field': "'f11'"})
    fkpk = columns['fkpk']
    self.assertEqual(fkpk['col_types_id'].get_field_parameters(), {'column_name': "'col_types_id'", 'model': 'ColTypes', 'primary_key': True, 'field': "'f11'"})
    category = columns['category']
    parent_id = category['parent_id']
    self.assertEqual(parent_id.get_field_parameters(), {'column_name': "'parent_id'", 'null': True, 'model': "'self'", 'field': "'id'"})
    nugget = columns['nugget']
    category_fk = nugget['category_id']
    self.assertEqual(category_fk.name, 'category_id')
    self.assertEqual(category_fk.get_field_parameters(), {'field': "'id'", 'model': 'Category', 'column_name': "'category_id'"})
    category = nugget['category']
    self.assertEqual(category.name, 'category')