def METHOD_NAME(self, pyramid_request):
    pyramid_request.params["q"] = "tag:foo"
    pyramid_request.matchdict["tag"] = "foo"
    with pytest.raises(httpexceptions.HTTPFound) as exc:
        main.stream(None, pyramid_request)
    assert exc.value.location == "http://example.com/search?q=tag%3Afoo"