コード例 #1
0
ファイル: test.py プロジェクト: zhammer/dd-trace-py
def test_redis_legacy():
    # ensure the old interface isn't broken, but doesn't trace
    tracer = get_dummy_tracer()
    TracedRedisCache = get_traced_redis(tracer, 'foo')
    r = TracedRedisCache(port=REDIS_CONFIG['port'])
    r.set('a', 'b')
    got = r.get('a')
    assert compat.to_unicode(got) == 'b'
    assert not tracer.writer.pop()
コード例 #2
0
def test_redis_legacy():
    # ensure the old interface isn't broken, but doesn't trace
    tracer = get_dummy_tracer()
    TracedRedisCache = get_traced_redis(tracer, "foo")
    r = TracedRedisCache(port=REDIS_CONFIG['port'])
    r.set("a", "b")
    got = r.get("a")
    eq_(compat.to_unicode(got), "b")
    assert not tracer.writer.pop()
コード例 #3
0
ファイル: test.py プロジェクト: tebriel/dd-trace-py
def test_redis_legacy():
    # ensure the old interface isn't broken, but doesn't trace
    tracer = get_dummy_tracer()
    TracedRedisCache = get_traced_redis(tracer, "foo")
    r = TracedRedisCache(port=REDIS_CONFIG['port'])
    r.set("a", "b")
    got = r.get("a")
    eq_(compat.to_unicode(got), "b")
    assert not tracer.writer.pop()