def test_dict_merge(): a = {"a": 1} b = {"b": 2} c = {"c": 3} assert dict_merge(a, b, c) == {"a": 1, "b": 2, "c": 3} with pytest.raises(AssertionError): dict_merge([])
def test_response_callbacks(self, r): all_response_callbacks = dict_merge( rediscluster.RedisCluster.RESPONSE_CALLBACKS, rediscluster.RedisCluster.CLUSTER_COMMANDS_RESPONSE_CALLBACKS, ) assert r.response_callbacks == all_response_callbacks assert id(r.response_callbacks) != id(all_response_callbacks) r.set_response_callback('GET', lambda x: 'static') r['a'] = 'foo' assert r['a'] == 'static'
def test_dict_merge_value_error(): with pytest.raises(ValueError): dict_merge([])
def test_dict_merge(): a = {"a": 1} b = {"b": 2} c = {"c": 3} assert dict_merge(a, b, c) == {"a": 1, "b": 2, "c": 3}