def METHOD_NAME(accounts, config):
    """gas limit is set correctly when specified in the call"""
    config.active_network["settings"]["gas_limit"] = None
    foo = compile_source(code).Foo.deploy({"from": accounts[0]})
    tx = accounts[0].transfer(foo, 1000, gas_buffer=1.337)
    assert int(tx.gas_used * 1.337) == tx.gas_limit