Exemplo n.º 1
0
 def test_one_table_with_foreign_key_on_label(self):
     dot = SQLSchema('My table model')
     table = dot.add_label('My table')
     table.add_column('My column', 'Integer', primary_key=True)
     table2 = dot.add_table('A 2nd table')
     table2.add_foreign_key('My fk', table, nullable=False)
     dot.render()
Exemplo n.º 2
0
 def test_one_table_with_foreign_key_on_label(self):
     dot = SQLSchema('My table model')
     table = dot.add_label('My table')
     table.add_column('My column', 'Integer', primary_key=True)
     table2 = dot.add_table('A 2nd table')
     table2.add_foreign_key('My fk', table, nullable=False)
     dot.render()
Exemplo n.º 3
0
 def test_get_table_with_label(self):
     dot = SQLSchema('My UML model')
     table = dot.add_label('My table')
     self.assertEqual(dot.get_table('My table'), table)
Exemplo n.º 4
0
 def test_get_table_with_label(self):
     dot = SQLSchema('My UML model')
     table = dot.add_label('My table')
     assert dot.get_table('My table') == table
Exemplo n.º 5
0
 def test_get_table_with_label(self):
     dot = SQLSchema('My UML model')
     table = dot.add_label('My table')
     self.assertEqual(dot.get_table('My table'), table)