79f648dd1f0066396be1eb71b1bc48107fc30d52
[ric-app/qp.git] / tests / conftest.py
1 # ==================================================================================
2 #       Copyright (c) 2020 AT&T Intellectual Property.
3 #
4 #   Licensed under the Apache License, Version 2.0 (the "License");
5 #   you may not use this file except in compliance with the License.
6 #   You may obtain a copy of the License at
7 #
8 #          http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #   Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #   See the License for the specific language governing permissions and
14 #   limitations under the License.
15 # ==================================================================================
16
17
18 import pytest
19
20
21 @pytest.fixture
22 def qp_prediction():
23     return {
24         "12345": {
25             "310-680-200-555001": [50000, 20000],
26             "310-680-200-555003": [20000, 10000],
27             "310-680-200-555002": [20000, 10000]
28         }
29     }
30
31
32 @pytest.fixture
33 def qpd_to_qp():
34     return {
35         "PredictionUE": "12345",
36         "UEMeasurements": {
37             "ServingCellID": "310-680-200-555002",
38             "MeasTimestampUEPDCPBytes": "2020-03-18 02:23:18.220",
39             "MeasPeriodUEPDCPBytes": 20,
40             "UEPDCPBytesDL": 250000,
41             "UEPDCPBytesUL": 100000,
42             "MeasTimestampUEPRBUsage": "2020-03-18 02:23:18.220",
43             "MeasPeriodUEPRBUsage": 20,
44             "UEPRBUsageDL": 10,
45             "UEPRBUsageUL": 30,
46         },
47         "CellMeasurements": [
48             {
49                 "CellID": "310-680-200-555001",
50                 "MeasTimestampPDCPBytes": "2020-03-18 02:23:18.220",
51                 "MeasPeriodPDCPBytes": 20,
52                 "PDCPBytesDL": 2000000,
53                 "PDCPBytesUL": 1200000,
54                 "MeasTimestampAvailPRB": "2020-03-18 02:23:18.220",
55                 "MeasPeriodAvailPRB": 20,
56                 "AvailPRBDL": 30,
57                 "AvailPRBUL": 50,
58                 "MeasTimestampRF": "2020-03-18 02:23:18.210",
59                 "MeasPeriodRF": 40,
60                 "RFMeasurements": {"RSRP": -90, "RSRQ": -13, "RSSINR": -2.5},
61             },
62             {
63                 "CellID": "310-680-200-555003",
64                 "MeasTimestampPDCPBytes": "2020-03-18 02:23:18.220",
65                 "MeasPeriodPDCPBytes": 20,
66                 "PDCPBytesDL": 1900000,
67                 "PDCPBytesUL": 1000000,
68                 "MeasTimestampAvailPRB": "2020-03-18 02:23:18.220",
69                 "MeasPeriodAvailPRB": 20,
70                 "AvailPRBDL": 60,
71                 "AvailPRBUL": 80,
72                 "MeasTimestampRF": "2020-03-18 02:23:18.210",
73                 "MeasPeriodRF": 40,
74                 "RFMeasurements": {"RSRP": -140, "RSRQ": -17, "RSSINR": -6},
75             },
76             {
77                 "CellID": "310-680-200-555002",
78                 "MeasTimestampPDCPBytes": "2020-03-18 02:23:18.220",
79                 "MeasPeriodPDCPBytes": 20,
80                 "PDCPBytesDL": 800000,
81                 "PDCPBytesUL": 400000,
82                 "MeasTimestampAvailPRB": "2020-03-18 02:23:18.220",
83                 "MeasPeriodAvailPRB": 20,
84                 "AvailPRBDL": 30,
85                 "AvailPRBUL": 45,
86                 "MeasTimestampRF": "2020-03-18 02:23:18.210",
87                 "MeasPeriodRF": 40,
88                 "RFMeasurements": {"RSRP": -115, "RSRQ": -16, "RSSINR": -5},
89             },
90         ],
91     }