def test_push(): engine = LocalMemoryEngine() actor = ActorBase(engine, [], {}) actor.push('foo', 1) assert actor.get('foo') == [1]
def test_push_broken(): engine = FaultyEngine() actor = ActorBase(engine, [], {}) with pytest.raises(StorageError): actor.push('foo', 1)
def test_pull(): engine = LocalMemoryEngine() actor = ActorBase(engine, [], {}) actor.push('foo', 1) assert list(actor.pull('foo')) == [1]