コード例 #1
0
def test_push():
    engine = LocalMemoryEngine()
    actor = ActorBase(engine, [], {})
    actor.push('foo', 1)
    assert actor.get('foo') == [1]
コード例 #2
0
def test_push_broken():
    engine = FaultyEngine()
    actor = ActorBase(engine, [], {})

    with pytest.raises(StorageError):
        actor.push('foo', 1)
コード例 #3
0
def test_pull():
    engine = LocalMemoryEngine()
    actor = ActorBase(engine, [], {})
    actor.push('foo', 1)
    assert list(actor.pull('foo')) == [1]