@tests.test
def add():
    unit, store = make_unit()
    unit.add('abc', 123)
    unit.add('def', 456)
    unit.add('def', 567)
    assert unit.get('abc') == 123
    assert unit.get('def') == 456
    assert unit.get_many('abc', 'def') == [123, 456]
    assert store.get(unit.subkey('abc')) == 123
    assert store.get(unit.subkey('def')) == 456
    for ref in unit.subkeys_transaction:
        assert ref() == frozenset(['abc', 'def'])
Tests add() method.
dataset/ETHPy150Open StyleShare/flask-volatile/volatiletests/unit.py/add