@pytest.mark.parametrize('path,added_args,expected', [('/foo', {'bar': 1}, '/foo?bar=1'), ('/foo?bar=1', {'baz': 2}, '/foo?bar=1&baz=2'), ('/foo?bar=1&bar=2', {'baz': 3}, '/foo?bar=1&bar=2&baz=3'), ('/foo?bar=1', {'bar': None}, '/foo'), ('/?_facet=prim_state&_facet=area_name', (('prim_state', 'GA'),), '/?_facet=prim_state&_facet=area_name&prim_state=GA'), ('/?_facet=state&_facet=city&state=MI', (('city', 'Detroit'),), '/?_facet=state&_facet=city&state=MI&city=Detroit'), ('/?_facet=state&_facet=city', (('_facet', 'planet_int'),), '/?_facet=state&_facet=city&_facet=planet_int')])
def test_path_with_added_args(path, added_args, expected):
    request = Request.fake(path)
    actual = utils.path_with_added_args(request, added_args)
    assert (expected == actual)
@pytest.mark.parametrize('path,added_args,expected', [('/foo', {'bar': 1}, '/foo?bar=1'), ('/foo?bar=1', {'baz': 2}, '/foo?bar=1&baz=2'), ('/foo?bar=1&bar=2', {'baz': 3}, '/foo?bar=1&bar=2&baz=3'), ('/foo?bar=1', {'bar': None}, '/foo'), ('/?_facet=prim_state&_facet=area_name', (('prim_state', 'GA'),), '/?_facet=prim_state&_facet=area_name&prim_state=GA'), ('/?_facet=state&_facet=city&state=MI', (('city', 'Detroit'),), '/?_facet=state&_facet=city&state=MI&city=Detroit'), ('/?_facet=state&_facet=city', (('_facet', 'planet_int'),), '/?_facet=state&_facet=city&_facet=planet_int')])
def test_path_with_added_args(path, added_args, expected):
    request = Request.fake(path)
    actual = utils.path_with_added_args(request, added_args)
    assert (expected == actual)