Exemplo n.º 1
0
def test_parse_query(mock_indexer, query_string, expected):
    local_indexer = MockIndexer()
    for s in ("", "[email protected]", "transaction", "/bar/:orgId/"):
        local_indexer.record(s)
    mock_indexer.resolve = local_indexer.resolve
    parsed = _resolve_tags(parse_query(query_string))
    assert parsed == expected
Exemplo n.º 2
0
def test_parse_query(monkeypatch, query_string, expected):
    local_indexer = MockIndexer()
    for s in ("", "[email protected]", "transaction", "/bar/:orgId/"):
        local_indexer.record(1, s)
    monkeypatch.setattr("sentry.sentry_metrics.indexer.resolve",
                        local_indexer.resolve)
    parsed = resolve_tags(parse_query(query_string))
    assert parsed == expected