import redis

def test_redis():
    redis_instance = redis.StrictRedis(host='localhost', port=6379, db=0, decode_responses=True)
    redis_instance.set('foo', 'bar')
    assert redis_instance.get('foo') == 'bar'

@@ -5,16 +5,109 @@
 rt redis
+%0Afrom graphscale.kvetch.kvetch_utils import data_to_body, body_to_data%0Afrom uuid import uuid4
 %0A%0Adef te
@@ -298,8 +298,666 @@
 = 'bar'%0A
+%0Adef test_store_kvetch_obj():%0A    redis_instance = redis.StrictRedis(host='localhost', port=6379, db=0, decode_responses=False)%0A    data = %7B'num': 4, 'str': 'some string'%7D%0A    obj_id = uuid4()%0A    body = data_to_body(data)%0A    redis_instance.set(obj_id, body)%0A    out_body = redis_instance.get(obj_id)%0A    out_data = body_to_data(out_body)%0A    assert data == out_data%0A%0Adef test_mget():%0A    redis_instance = redis.StrictRedis(host='localhost', port=6379, db=0, decode_responses=True)%0A    redis_instance.set('foo1', 'bar1')%0A    redis_instance.set('foo2', 'bar2')%0A    out_value = redis_instance.mget(%5B'foo1', 'foo2'%5D)%0A    assert out_value == %5B'bar1', 'bar2'%5D%0A%0A%0A

add redis test