예제 #1
0
 def CheckSqliteDate(self):
     d = sqlite.Date(2004, 2, 14)
     self.cur.execute("insert into test(d) values (?)", (d, ))
     self.cur.execute("select d from test")
     d2 = self.cur.fetchone()[0]
     self.failUnlessEqual(d, d2)
예제 #2
0
 def CheckDate(self):
     d = sqlite.Date(2004, 10, 28)
예제 #3
0
파일: test_dbapi.py 프로젝트: moi90/cpython
 def test_date(self):
     d = sqlite.Date(2004, 10, 28)
예제 #4
0
 def test_sqlite_date(self):
     d = sqlite.Date(2004, 2, 14)
     self.cur.execute("insert into test(d) values (?)", (d, ))
     self.cur.execute("select d from test")
     d2 = self.cur.fetchone()[0]
     self.assertEqual(d, d2)
예제 #5
0
 class Artist(Model):
     first_name = last_name = Field(str, "NA")
     birthday = Field(sql.Date, sql.Date(1000, 1, 1), not_null=True)
예제 #6
0
 def CheckSqliteDate(self):
     d = sqlite.Date(2004, 2, 14)
     self.cur.execute('insert into test(d) values (?)', (d,))
     self.cur.execute('select d from test')
     d2 = self.cur.fetchone()[0]
     self.assertEqual(d, d2)