MCPcopy Create free account
hub / github.com/Vanderhoof/PyDBML / test_add_table

Method test_add_table

test/test_database.py:23–31  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21
22class TestDatabase(TestCase):
23 def test_add_table(self) -> None:
24 c = Column('test', 'varchar', True)
25 t = Table('test_table')
26 t.add_column(c)
27 database = Database()
28 res = database.add_table(t)
29 self.assertEqual(t.database, database)
30 self.assertIs(res, t)
31 self.assertIn(t, database.tables)
32
33 def test_add_table_alias(self) -> None:
34 c = Column('test', 'varchar', True)

Callers

nothing calls this directly

Calls 5

add_columnMethod · 0.95
add_tableMethod · 0.95
ColumnClass · 0.90
TableClass · 0.90
DatabaseClass · 0.90

Tested by

no test coverage detected