コード例 #1
0
def test_get_broken():
    engine = FaultyEngine()
    actor = ActorBase(engine, [], {})

    with pytest.raises(StorageError):
        actor.get('foo')
コード例 #2
0
def test_delete():
    engine = LocalMemoryEngine()
    actor = ActorBase(engine, [], {})
    actor.put('foo', True)
    actor.delete('foo')
    assert actor.get('foo') is None
コード例 #3
0
def test_get():
    engine = LocalMemoryEngine()
    actor = ActorBase(engine, [], {})
    assert not actor.get('foo')
コード例 #4
0
def test_push():
    engine = LocalMemoryEngine()
    actor = ActorBase(engine, [], {})
    actor.push('foo', 1)
    assert actor.get('foo') == [1]