#NEWLINE# @ pytest . yield_fixture #NEWLINE# def redis_server( redis_process , db ) : #NEWLINE# #INDENT# server = RedisServer . objects . create ( hostname = db ) #NEWLINE# c = server . connection #NEWLINE# c . set ( 'str' , 'bar' ) #NEWLINE# c . sadd ( 'set' , 'bar' ) #NEWLINE# c . sadd ( 'set' , 'foo' ) #NEWLINE# c . hset ( 'hash' , 'key' , 'val' ) #NEWLINE# c . hset ( 'hash' , 'foo' , 'bar' ) #NEWLINE# c . lpush ( 'list' , 'foo' , 'bar' , 'foobar' ) #NEWLINE# c . zadd ( 'sorted-set' , 'foo' , 1 ) #NEWLINE# c . zadd ( 'sorted-set' , 'b' , 2 ) #NEWLINE# c . eval ( "\n        local c = 0\n        while c < 1000000 do\n            redis.call('get', 'str')\n            c = c + 1\n        end\n    " , 0 ) #NEWLINE# ( yield server )