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

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