def test_remove(context): assert 0 == context.write_full("foo", b'bar') assert b'bar' == context.read('foo') context.remove('foo') with pytest.raises(rados.ObjectNotFound) as e: context.stat('foo')
def test_stat(context): context.write_full('foo', b'Hello world!') (size, time) = context.stat('foo') assert 12 == size diff = datetime.now() - datetime.fromtimestamp(mktime(time)) assert 5 > diff.total_seconds()