aboutsummaryrefslogtreecommitdiff
path: root/test_utils/precision/conftest.py
blob: 7acfe6aa7dfba0ed8808e06db68a36012f9decc8 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
from typing import Any

import pytest


@pytest.fixture(scope="session")
def precision_survey_json() -> dict[str, Any]:
    return {
        "cpi": "1.44",
        "country_isos": "ca",
        "language_isos": "eng",
        "country_iso": "ca",
        "language_iso": "eng",
        "buyer_id": "7047",
        "bid_loi": 1200,
        "bid_ir": 0.45,
        "source": "e",
        "used_question_ids": ["age", "country_iso", "gender", "gender_1"],
        "survey_id": "0000",
        "group_id": "633473",
        "status": "open",
        "name": "beauty survey",
        "survey_guid": "c7f375c5077d4c6c8209ff0b539d7183",
        "category_id": "-1",
        "global_conversion": None,
        "desired_count": 96,
        "achieved_count": 0,
        "allowed_devices": "1,2,3",
        "entry_link": "https://www.opinionetwork.com/survey/entry.aspx?mid=[%MID%]&project=633473&key=%%key%%",
        "excluded_surveys": "470358,633286",
        "quotas": [
            {
                "name": "25-34,Male,Quebec",
                "id": "2324110",
                "guid": "23b5760d24994bc08de451b3e62e77c7",
                "status": "open",
                "desired_count": 48,
                "achieved_count": 0,
                "termination_count": 0,
                "overquota_count": 0,
                "condition_hashes": ["b41e1a3", "bc89ee8", "4124366", "9f32c61"],
            },
            {
                "name": "25-34,Female,Quebec",
                "id": "2324111",
                "guid": "0706f1a88d7e4f11ad847c03012e68d2",
                "status": "open",
                "desired_count": 48,
                "achieved_count": 0,
                "termination_count": 4,
                "overquota_count": 0,
                "condition_hashes": ["b41e1a3", "0cdc304", "500af2c", "9f32c61"],
            },
        ],
        "conditions": {
            "b41e1a3": {
                "logical_operator": "OR",
                "value_type": 1,
                "negate": False,
                "question_id": "country_iso",
                "values": ["ca"],
                "criterion_hash": "b41e1a3",
                "value_len": 1,
                "sizeof": 2,
            },
            "bc89ee8": {
                "logical_operator": "OR",
                "value_type": 1,
                "negate": False,
                "question_id": "gender",
                "values": ["male"],
                "criterion_hash": "bc89ee8",
                "value_len": 1,
                "sizeof": 4,
            },
            "4124366": {
                "logical_operator": "OR",
                "value_type": 1,
                "negate": False,
                "question_id": "gender_1",
                "values": ["male"],
                "criterion_hash": "4124366",
                "value_len": 1,
                "sizeof": 4,
            },
            "9f32c61": {
                "logical_operator": "OR",
                "value_type": 1,
                "negate": False,
                "question_id": "age",
                "values": ["25", "26", "27", "28", "29", "30", "31", "32", "33", "34"],
                "criterion_hash": "9f32c61",
                "value_len": 10,
                "sizeof": 20,
            },
            "0cdc304": {
                "logical_operator": "OR",
                "value_type": 1,
                "negate": False,
                "question_id": "gender",
                "values": ["female"],
                "criterion_hash": "0cdc304",
                "value_len": 1,
                "sizeof": 6,
            },
            "500af2c": {
                "logical_operator": "OR",
                "value_type": 1,
                "negate": False,
                "question_id": "gender_1",
                "values": ["female"],
                "criterion_hash": "500af2c",
                "value_len": 1,
                "sizeof": 6,
            },
        },
        "expected_end_date": "2024-06-28T10:40:33.000000Z",
        "created": None,
        "updated": None,
        "is_live": True,
        "all_hashes": [
            "0cdc304",
            "b41e1a3",
            "9f32c61",
            "bc89ee8",
            "4124366",
            "500af2c",
        ],
    }