@pytest.mark.parametrize('items, key', [(({},), '\x01\x01'), (({'a': 'b'}, [1, 2]), '\x01\x80\x02U\x01a.\x02\x80\x02U\x01b.\x01\x00\x03\x80\x02K\x01.\x00\x80\x02K\x02.\x03'), ((function,), '\x04function\x00unit.test_cache'), ((Class,), '\x04Class\x00unit.test_cache'), ((Class.method,), '\x04method\x00Class\x00unit.test_cache'), ((callable,), '\x04callable')], ids=['single mapping', 'multiple objects', 'function', 'class', 'method', 'builtin'])
def test_object_key_maker_key(items, key):
    'Generate key using string key maker.'
    key_maker = ftrack_api.cache.ObjectKeyMaker()
    assert (key_maker.key(*items) == key)
Generate key using string key maker.
@pytest.mark.parametrize('items, key', [(({},), '\x01\x01'), (({'a': 'b'}, [1, 2]), '\x01\x80\x02U\x01a.\x02\x80\x02U\x01b.\x01\x00\x03\x80\x02K\x01.\x00\x80\x02K\x02.\x03'), ((function,), '\x04function\x00unit.test_cache'), ((Class,), '\x04Class\x00unit.test_cache'), ((Class.method,), '\x04method\x00Class\x00unit.test_cache'), ((callable,), '\x04callable')], ids=['single mapping', 'multiple objects', 'function', 'class', 'method', 'builtin'])
def test_object_key_maker_key(items, key):
    
    key_maker = ftrack_api.cache.ObjectKeyMaker()
    assert (key_maker.key(*items) == key)