Пример #1
0
 def testColumnCreateDefault(self):
     column = Column("col", str, default="HEyYA")
     self.assertEqual(column._create(), "col TEXT DEFAULT HEyYA")
Пример #2
0
 def testColumnCreateAutoincrement(self):
     column = Column("col", int, autoincrement=True, primary_key=True)
     self.assertEqual(column._create(),
                      "col INTEGER PRIMARY KEY AUTOINCREMENT")
Пример #3
0
 def testColumnCreateUnique(self):
     column = Column("col", str, unique=True)
     self.assertEqual(column._create(), "col TEXT UNIQUE")
Пример #4
0
 def testColumnCreateNotNull(self):
     column = Column("col", str, not_null=True)
     self.assertEqual(column._create(), "col TEXT NOT NULL")
Пример #5
0
 def testColumnCreatePrimaryKey(self):
     column = Column("col", str, primary_key=True)
     self.assertEqual(column._create(), "col TEXT PRIMARY KEY")
Пример #6
0
 def testColumnCreate(self):
     column = Column("col", str)
     self.assertEqual(column._create(), "col TEXT")