コード例 #1
0
ファイル: base.py プロジェクト: olivecoder/mamba-storm
 def test_mixing_standard_and_two_phase_commits(self):
     """
     It's possible to mix standard and two phase commits across different
     transactions.
     """
     self.connection.execute("INSERT INTO test VALUES (30, 'Title 30')")
     self.connection.commit()
     xid = Xid(0, "foo", "bar")
     self.connection.begin(xid)
     self.connection.execute("INSERT INTO test VALUES (40, 'Title 40')")
     self.connection.prepare()
     self.connection.commit()
     result = self.connection.execute("SELECT id FROM test "
                                      "WHERE id IN (30, 40)")
     self.assertEqual([(30, ), (40, )], result.get_all())