コード例 #1
0
def test_write_through_with_collection_wide_subscription():
    assert slash() == 'hello/hihi'

    DummyA.update(2, {'value': 'lol'})

    execute_all_jobs(worker_queue, redis_con)

    assert smache.function_cache_value(slash) == 'hello/lol'
コード例 #2
0
def test_write_through_with_collection_wide_subscription():
    assert slash() == 'hello/hihi'

    DummyA.update(2, {'value': 'lol'})

    execute_all_jobs(worker_queue, redis_con)

    assert smache.function_cache_value(slash) == 'hello/lol'
コード例 #3
0
def test_write_through():
    ax = DummyA(1, 'hello')
    bx = DummyB(1, 'world')

    assert hyphen(ax, bx) == 'hello - world'
    assert slash() == 'hello/hihi'

    assert smache.is_fun_fresh(hyphen, ax, bx) == True

    DummyA.update(1, {'value': 'wtf'})

    execute_all_jobs(worker_queue, redis_con)

    assert smache.is_fun_fresh(hyphen, ax, bx) == True

    assert smache.function_cache_value(hyphen, ax, bx) == 'wtf - world'
コード例 #4
0
def test_write_through():
    ax = DummyA(1, 'hello')
    bx = DummyB(1, 'world')

    assert hyphen(ax, bx) == 'hello - world'
    assert slash() == 'hello/hihi'

    assert smache.is_fun_fresh(hyphen, ax, bx) == True

    DummyA.update(1, {'value': 'wtf'})

    execute_all_jobs(worker_queue, redis_con)

    assert smache.is_fun_fresh(hyphen, ax, bx) == True

    assert smache.function_cache_value(
        hyphen, ax, bx
    ) == 'wtf - world'