def testColumnCreateDefault(self): column = Column("col", str, default="HEyYA") self.assertEqual(column._create(), "col TEXT DEFAULT HEyYA")
def testColumnCreateAutoincrement(self): column = Column("col", int, autoincrement=True, primary_key=True) self.assertEqual(column._create(), "col INTEGER PRIMARY KEY AUTOINCREMENT")
def testColumnCreateUnique(self): column = Column("col", str, unique=True) self.assertEqual(column._create(), "col TEXT UNIQUE")
def testColumnCreateNotNull(self): column = Column("col", str, not_null=True) self.assertEqual(column._create(), "col TEXT NOT NULL")
def testColumnCreatePrimaryKey(self): column = Column("col", str, primary_key=True) self.assertEqual(column._create(), "col TEXT PRIMARY KEY")
def testColumnCreate(self): column = Column("col", str) self.assertEqual(column._create(), "col TEXT")