@tests.test
def set_delete_many():
    # set_many
    unit, store = make_unit()
    unit.set_many({'abc': 123, 'def': 456, 'ghi': 789, 'jkl': 123})
    assert unit.get('abc') == 123
    assert unit.get('def') == 456
    assert unit.get('ghi') == 789
    assert unit.get('jkl') == 123
    assert unit.get_many('abc', 'def', 'ghi', 'jkl') == [123, 456, 789, 123]
    assert store.get(unit.subkey('abc')) == 123
    assert store.get(unit.subkey('def')) == 456
    assert store.get(unit.subkey('ghi')) == 789
    assert store.get(unit.subkey('jkl')) == 123
    for ref in unit.subkeys_transaction:
        assert ref() == frozenset(['abc', 'def', 'ghi', 'jkl'])
    # delete_many
    unit.delete_many('def', 'jkl')
    assert unit.get('abc') == 123
    assert unit.get('def') is None
    assert unit.get('ghi') == 789
    assert unit.get('jkl') is None
    assert unit.get_many('abc', 'def', 'ghi', 'jkl') == [123, None, 789, None]
    assert store.get(unit.subkey('abc')) == 123
    assert store.get(unit.subkey('def')) is None
    assert store.get(unit.subkey('ghi')) == 789
    assert store.get(unit.subkey('jkl')) is None
    for ref in unit.subkeys_transaction:
        assert ref() == frozenset(['abc', 'ghi'])
Tests set_many() and delete_many() methods.
dataset/ETHPy150Open StyleShare/flask-volatile/volatiletests/unit.py/set_delete_many