def test_log(db: RunDBInterface): uid = "m33" data1, data2 = b"ab", b"cd" db.store_log(uid, body=data1) _, log = db.get_log(uid) assert data1 == log, "get log 1" db.store_log(uid, body=data2, append=True) _, log = db.get_log(uid) assert data1 + data2 == log, "get log 2" db.store_log(uid, body=data1, append=False) _, log = db.get_log(uid) assert data1 == log, "get log append=False"
def test_log(db: RunDBInterface): uid = 'm33' data1, data2 = b'ab', b'cd' db.store_log(uid, body=data1) _, log = db.get_log(uid) assert data1 == log, 'get log 1' db.store_log(uid, body=data2, append=True) _, log = db.get_log(uid) assert data1 + data2 == log, 'get log 2' db.store_log(uid, body=data1, append=False) _, log = db.get_log(uid) assert data1 == log, 'get log append=False'