@pytest.mark.parametrize('url, host, query', [('testfoo', 'www.example.com', 'q=testfoo'), ('test testfoo', 'www.qutebrowser.org', 'q=testfoo'), ('test testfoo bar foo', 'www.qutebrowser.org', 'q=testfoo bar foo'), ('test testfoo ', 'www.qutebrowser.org', 'q=testfoo'), ('!python testfoo', 'www.example.com', 'q=%21python testfoo'), ('blub testfoo', 'www.example.com', 'q=blub testfoo'), ('stripped ', 'www.example.com', 'q=stripped'), ('test-with-dash testfoo', 'www.example.org', 'q=testfoo')])
def test_get_search_url(urlutils_config_stub, url, host, query):
 url = urlutils._get_search_url(url)
 assert (url.host() == host)
 assert (url.query() == query)

@ pytest . mark . parametrize ( 'url, host, query' , [ ( 'testfoo' , 'www.example.com' , 'q=testfoo' ) , ( 'test testfoo' , 'www.qutebrowser.org' , 'q=testfoo' ) , ( 'test testfoo bar foo' , 'www.qutebrowser.org' , 'q=testfoo bar foo' ) , ( 'test testfoo ' , 'www.qutebrowser.org' , 'q=testfoo' ) , ( '!python testfoo' , 'www.example.com' , 'q=%21python testfoo' ) , ( 'blub testfoo' , 'www.example.com' , 'q=blub testfoo' ) , ( 'stripped ' , 'www.example.com' , 'q=stripped' ) , ( 'test-with-dash testfoo' , 'www.example.org' , 'q=testfoo' ) ] ) def test_get_search_url ( urlutils_config_stub , url , host , query ) : url = urlutils . _get_search_url ( url ) assert ( url . host ( ) == host ) assert ( url . query ( ) == query )
test _get_search_url() .