def test_null_to_python(self):
        self.conn.execute("INSERT INTO tab VALUES(NULL, NULL)")

        r = self.conn.execute("SELECT * FROM _audit").fetchone()
        py_val = audit.to_python(r[4])

        self.assertEqual(py_val, [['c1', None], ['c2', None]])
    def test_nums_to_python(self):
        self.conn.execute("INSERT INTO tab VALUES(5, 3.14)")

        r = self.conn.execute("SELECT * FROM _audit").fetchone()
        py_val = audit.to_python(r[4])

        self.assertEqual(py_val, [['c1', 5], ['c2', 3.14]])
    def test_string_to_python(self):
        self.conn.execute("INSERT INTO tab VALUES('a', 'b')")

        r = self.conn.execute("SELECT * FROM _audit").fetchone()
        py_val = audit.to_python(r[4])

        self.assertEqual(py_val, [['c1', 'a'], ['c2', 'b']])
예제 #4
0
    def test_null_to_python(self):
        self.conn.execute("INSERT INTO tab VALUES(NULL, NULL)")

        r = self.conn.execute("SELECT * FROM _audit").fetchone()
        py_val = audit.to_python(r[4])

        self.assertEqual(py_val,
                         [['c1', None],
                          ['c2', None]])
예제 #5
0
    def test_nums_to_python(self):
        self.conn.execute("INSERT INTO tab VALUES(5, 3.14)")

        r = self.conn.execute("SELECT * FROM _audit").fetchone()
        py_val = audit.to_python(r[4])

        self.assertEqual(py_val,
                         [['c1', 5],
                          ['c2', 3.14]])
예제 #6
0
    def test_string_to_python(self):
        self.conn.execute("INSERT INTO tab VALUES('a', 'b')")

        r = self.conn.execute("SELECT * FROM _audit").fetchone()
        py_val = audit.to_python(r[4])

        self.assertEqual(py_val,
                         [['c1', 'a'],
                          ['c2', 'b']])