aboutsummaryrefslogtreecommitdiff
path: root/tests/managers/test_lucid.py
blob: 20dca220e2c8e6523e09b166333e4f9915674fe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from __future__ import annotations

import pytest

from generalresearch.managers.lucid.profiling import get_profiling_library
from generalresearch.pg_helper import PostgresConfig

qids = ["42", "43", "45", "97", "120", "639", "15297"]


class TestLucidProfiling:

    @pytest.mark.skip
    def test_get_library(self, thl_web_rr: PostgresConfig):
        pks = [(qid, "us", "eng") for qid in qids]
        qs = get_profiling_library(thl_web_rr, pks=pks)
        assert len(qids) == len(qs)

        # just making sure this doesn't raise errors
        for q in qs:
            q.to_upk_question()

        # a lot will fail parsing because they have no options or the options are blank
        #   just asserting that we get some back
        qs = get_profiling_library(thl_web_rr, country_iso="mx", language_iso="spa")
        assert len(qs) > 100