MCPcopy
hub / github.com/psycopg/psycopg / test_xid_unicode

Method test_xid_unicode

tests/test_tpc.py:244–255  ·  view source on GitHub ↗
(self, conn_cls, conn, dsn, tpc)

Source from the content-addressed store, hash-verified

242 assert xid.bqual is None
243
244 def test_xid_unicode(self, conn_cls, conn, dsn, tpc):
245 x1 = conn.xid(10, "uni", "code")
246 conn.tpc_begin(x1)
247 conn.tpc_prepare()
248 conn.close()
249
250 with conn_cls.connect(dsn) as conn:
251 xid = [x for x in conn.tpc_recover() if x.database == conn.info.dbname][0]
252
253 assert 10 == xid.format_id
254 assert "uni" == xid.gtrid
255 assert "code" == xid.bqual
256
257 def test_xid_unicode_unparsed(self, conn_cls, conn, dsn, tpc):
258 # We don't expect people shooting snowmen as transaction ids,

Callers

nothing calls this directly

Calls 6

xidMethod · 0.80
tpc_beginMethod · 0.45
tpc_prepareMethod · 0.45
closeMethod · 0.45
connectMethod · 0.45
tpc_recoverMethod · 0.45

Tested by

no test coverage detected