def test_get_broken(): engine = FaultyEngine() actor = ActorBase(engine, [], {}) with pytest.raises(StorageError): actor.get('foo')
def test_delete(): engine = LocalMemoryEngine() actor = ActorBase(engine, [], {}) actor.put('foo', True) actor.delete('foo') assert actor.get('foo') is None
def test_get(): engine = LocalMemoryEngine() actor = ActorBase(engine, [], {}) assert not actor.get('foo')
def test_push(): engine = LocalMemoryEngine() actor = ActorBase(engine, [], {}) actor.push('foo', 1) assert actor.get('foo') == [1]