Exemplo n.º 1
0
def test_simple_write(context):
    try:
        context.remove('foo')
    except rados.ObjectNotFound:
        pass

    context.write('foo', b'The quick brown fox jumps over the lazy dog')
    assert b'The quick brown fox jumps over the lazy dog' == context.read('foo')
Exemplo n.º 2
0
def test_offset_write(context):
    context.write_full('foo', b'The quick brown fox jumps over the lazy dog')
    context.write('foo', b'flies', offset=20)
    assert b'The quick brown fox flies over the lazy dog' == context.read('foo')