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

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