コード例 #1
0
def test_get_lpq_projects_empty(store: RedisRealtimeMetricsStore,
                                redis_cluster: redis._RedisCluster) -> None:
    redis_cluster.sadd("store.symbolicate-event-lpq-selected", 1)
    redis_cluster.srem("store.symbolicate-event-lpq-selected", 1)

    in_lpq = store.get_lpq_projects()
    assert in_lpq == set()
コード例 #2
0
def test_add_project_to_lpq_empty(store: RedisRealtimeMetricsStore,
                                  redis_cluster: redis._RedisCluster) -> None:
    redis_cluster.sadd("store.symbolicate-event-lpq-selected", 1)
    redis_cluster.srem("store.symbolicate-event-lpq-selected", 1)

    added = store.add_project_to_lpq(1)
    assert added
    in_lpq = redis_cluster.smembers("store.symbolicate-event-lpq-selected")
    assert in_lpq == {"1"}
コード例 #3
0
def test_remove_projects_from_lpq_empty(
        store: RedisRealtimeMetricsStore,
        redis_cluster: redis._RedisCluster) -> None:
    redis_cluster.sadd("store.symbolicate-event-lpq-selected", 1)
    redis_cluster.srem("store.symbolicate-event-lpq-selected", 1)

    removed = store.remove_projects_from_lpq({1})
    assert removed == 0
    remaining = redis_cluster.smembers("store.symbolicate-event-lpq-selected")
    assert remaining == set()