Exemplo n.º 1
0
    def test_no_tabs(self):
        p = MySQLInsertProtocol()

        row1 = p.write('score', [1, 1.0, 1.25])
        row2 = p.write('score', [0, None, None])

        self.assertNotEqual(row1.split('\t')[0], row2.split('\t')[0])
Exemplo n.º 2
0
    def test_tabs(self):
        p = MySQLInsertProtocol(output_tab=True)

        row1 = p.write('score', [1, 1.0, 1.25])
        row2 = p.write('score', [0, None, None])
        row3 = p.write('user', [2, u'Nully Nullington', None, None, None])

        self.assertEqual(row1.split('\t')[0], row2.split('\t')[0])
        self.assertNotEqual(row1.split('\t')[0], row3.split('\t')[0])