def METHOD_NAME(widget, url):
    "The URL of a webview can be set"
    # Set up a load handler
    on_webview_load_handler = Mock()
    widget.on_webview_load = on_webview_load_handler
    widget.url = url
    assert widget.url == url
    # There's no future created for the load.
    assert attribute_value(widget, "loaded_future") is None
    # The load handler hasn't been called yet
    on_webview_load_handler.assert_not_called()
    # Simulate a page load
    widget._impl.simulate_page_loaded()
    # handler has been invoked
    on_webview_load_handler.assert_called_once_with(widget)