class ResponsesData:
    test_billing_status = {
        "status": "Success",
        "reason": "BILLING_STATUS",
        "details": {
            "namespace": "pytest",
            "cost_total": 75665.4,
            "details": [
                {
                    "user_id": "e57c8668-6bc3-47c7-85de-903bfc3772b7",
                    "details": [
                        {
                            "rent_start": "2023-02-03 16:25:17",
                            "rent_end": "2023-02-09 10:15:24",
                            "rent_time": 496207.06346,
                            "rent_start_cost": "2023-02-03 16:25:17",
                            "rent_end_cost": "2023-02-09 10:15:24",
                            "rent_time_cost": 496207.06346,
                            "type": "events_resource",
                            "resources": {
                                "name": "test",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 1,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63dd356cc037717bc2322053",
                            "tid_end": None,
                            "cost_total": 1654,
                        },
                        {
                            "rent_start": "2023-02-03 16:58:38",
                            "rent_end": "2023-02-09 10:15:24",
                            "rent_time": 494206.064514,
                            "rent_start_cost": "2023-02-03 16:58:38",
                            "rent_end_cost": "2023-02-09 10:15:24",
                            "rent_time_cost": 494206.064514,
                            "type": "events_volume",
                            "resources": {
                                "name": "test2",
                                "disks_type": "ssd",
                                "size": 1,
                            },
                            "tid_start": "63dd3d3dc037717bc2322069",
                            "tid_end": None,
                            "cost_total": 823.7,
                        },
                        {
                            "rent_start": "2023-02-07 14:33:57",
                            "rent_end": "2023-02-09 10:15:24",
                            "rent_time": 157287.06558,
                            "rent_start_cost": "2023-02-07 14:33:57",
                            "rent_end_cost": "2023-02-09 10:15:24",
                            "rent_time_cost": 157287.06558,
                            "type": "events_resource",
                            "resources": {
                                "name": "test",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 2,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63e26155c037717bc232208b",
                            "tid_end": None,
                            "cost_total": 786.3000000000001,
                        },
                        {
                            "rent_start": "2023-02-08 13:57:02",
                            "rent_end": "2023-02-09 10:15:24",
                            "rent_time": 73102.066748,
                            "rent_start_cost": "2023-02-08 13:57:02",
                            "rent_end_cost": "2023-02-09 10:15:24",
                            "rent_time_cost": 73102.066748,
                            "type": "events_resource",
                            "resources": {
                                "name": "test2",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 2,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63e3aa2dc037717bc2322097",
                            "tid_end": None,
                            "cost_total": 365.40000000000003,
                        },
                        {
                            "rent_start": "2023-02-08 14:00:13",
                            "rent_end": "2023-02-09 10:15:24",
                            "rent_time": 72911.068128,
                            "rent_start_cost": "2023-02-08 14:00:13",
                            "rent_end_cost": "2023-02-09 10:15:24",
                            "rent_time_cost": 72911.068128,
                            "type": "events_resource",
                            "resources": {
                                "name": "test2",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 2,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63e3aaecc037717bc232209c",
                            "tid_end": None,
                            "cost_total": 364.5,
                        },
                        {
                            "rent_start": "2023-02-08 15:28:08",
                            "rent_end": "2023-02-09 10:15:24",
                            "rent_time": 67636.069558,
                            "rent_start_cost": "2023-02-08 15:28:08",
                            "rent_end_cost": "2023-02-09 10:15:24",
                            "rent_time_cost": 67636.069558,
                            "type": "events_resource",
                            "resources": {
                                "name": "test2",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 2,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63e3bf88c037717bc23220a1",
                            "tid_end": None,
                            "cost_total": 338.1,
                        },
                        {
                            "rent_start": "2023-02-02 15:24:01",
                            "rent_end": "2023-02-02 15:26:23",
                            "rent_time": 142,
                            "rent_start_cost": "2023-02-02 15:24:01",
                            "rent_end_cost": "2023-02-02 15:26:23",
                            "rent_time_cost": 142,
                            "type": "events_volume",
                            "resources": {
                                "name": "duzy",
                                "disks_type": "ssd",
                                "size": 1,
                            },
                            "tid_start": "63dbd597c037717bc232200a",
                            "tid_end": "63dbd61fc037717bc232200d",
                            "cost_total": 0.2,
                        },
                        {
                            "rent_start": "2023-02-02 15:40:52",
                            "rent_end": "2023-02-02 15:44:50",
                            "rent_time": 238,
                            "rent_start_cost": "2023-02-02 15:40:52",
                            "rent_end_cost": "2023-02-02 15:44:50",
                            "rent_time_cost": 238,
                            "type": "events_volume",
                            "resources": {
                                "name": "duzy",
                                "disks_type": "ssd",
                                "size": 1,
                            },
                            "tid_start": "63dbd983c037717bc2322015",
                            "tid_end": "63dbda71c037717bc2322019",
                            "cost_total": 0.4,
                        },
                        {
                            "rent_start": "2023-02-02 15:32:50",
                            "rent_end": "2023-02-03 15:38:32",
                            "rent_time": 86742,
                            "rent_start_cost": "2023-02-02 15:32:50",
                            "rent_end_cost": "2023-02-03 15:38:32",
                            "rent_time_cost": 86742,
                            "type": "events_resource",
                            "resources": {
                                "name": "test",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 1,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63dbd7a1c037717bc232200f",
                            "tid_end": "63dd2a77c037717bc2322041",
                            "cost_total": 289.2,
                        },
                        {
                            "rent_start": "2023-02-03 15:38:53",
                            "rent_end": "2023-02-03 16:06:05",
                            "rent_time": 1632,
                            "rent_start_cost": "2023-02-03 15:38:53",
                            "rent_end_cost": "2023-02-03 16:06:05",
                            "rent_time_cost": 1632,
                            "type": "events_resource",
                            "resources": {
                                "name": "test",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 2,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63dd2a8dc037717bc2322043",
                            "tid_end": "63dd30edc037717bc232204b",
                            "cost_total": 8.100000000000001,
                        },
                        {
                            "rent_start": "2023-02-03 16:06:13",
                            "rent_end": "2023-02-03 16:18:49",
                            "rent_time": 756,
                            "rent_start_cost": "2023-02-03 16:06:13",
                            "rent_end_cost": "2023-02-03 16:18:49",
                            "rent_time_cost": 756,
                            "type": "events_resource",
                            "resources": {
                                "name": "filebrowser",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 1,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63dd30f4c037717bc232204d",
                            "tid_end": "63dd33e8c037717bc2322050",
                            "cost_total": 2.6,
                        },
                        {
                            "rent_start": "2023-02-03 16:30:11",
                            "rent_end": "2023-02-03 16:33:25",
                            "rent_time": 194,
                            "rent_start_cost": "2023-02-03 16:30:11",
                            "rent_end_cost": "2023-02-03 16:33:25",
                            "rent_time_cost": 194,
                            "type": "events_resource",
                            "resources": {
                                "name": "test3",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 1,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63dd3692c037717bc232205b",
                            "tid_end": "63dd3754c037717bc232205e",
                            "cost_total": 0.6000000000000001,
                        },
                        {
                            "rent_start": "2023-02-03 16:53:52",
                            "rent_end": "2023-02-03 16:58:32",
                            "rent_time": 280,
                            "rent_start_cost": "2023-02-03 16:53:52",
                            "rent_end_cost": "2023-02-03 16:58:32",
                            "rent_time_cost": 280,
                            "type": "events_volume",
                            "resources": {
                                "name": "test2",
                                "disks_type": "ssd",
                                "size": 1,
                            },
                            "tid_start": "63dd3c20c037717bc2322063",
                            "tid_end": "63dd3d38c037717bc2322067",
                            "cost_total": 0.5,
                        },
                        {
                            "rent_start": "2023-02-02 14:03:20",
                            "rent_end": "2023-02-08 14:00:06",
                            "rent_time": 518206,
                            "rent_start_cost": "2023-02-02 14:03:20",
                            "rent_end_cost": "2023-02-08 14:00:06",
                            "rent_time_cost": 518206,
                            "type": "events_resource",
                            "resources": {
                                "name": "test2",
                                "entity": "nvidia-pytorch",
                                "cpu": 1,
                                "memory": 1,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63dbc2a8c037717bc2322001",
                            "tid_end": "63e3aae6c037717bc232209a",
                            "cost_total": 1727.4,
                        },
                        {
                            "rent_start": "2023-02-03 16:30:03",
                            "rent_end": "2023-02-08 15:27:22",
                            "rent_time": 428239,
                            "rent_start_cost": "2023-02-03 16:30:03",
                            "rent_end_cost": "2023-02-08 15:27:22",
                            "rent_time_cost": 428239,
                            "type": "events_resource",
                            "resources": {
                                "name": "test2",
                                "entity": "tensorflow-jupyter",
                                "cpu": 1,
                                "memory": 1,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63dd368ac037717bc2322058",
                            "tid_end": "63e3bf59c037717bc232209f",
                            "cost_total": 1427.4,
                        },
                    ],
                },
                {
                    "user_id": "9a8b327c-1f27-4d79-a387-071cd0954cf9",
                    "details": [
                        {
                            "rent_start": "2023-01-03 12:40:08",
                            "rent_end": "2023-02-09 10:15:24",
                            "rent_time": 3188116.118518,
                            "rent_start_cost": "2023-02-01 00:00:00",
                            "rent_end_cost": "2023-02-09 10:15:24",
                            "rent_time_cost": 728124.118518,
                            "type": "events_volume",
                            "resources": {
                                "name": "test",
                                "disks_type": "ssd",
                                "size": 1,
                            },
                            "tid_start": "63dd00a8c037717bc232201d",
                            "tid_end": None,
                            "cost_total": 24270,
                        },
                        {
                            "rent_start": "2023-02-04 09:08:29",
                            "rent_end": "2023-02-04 17:24:09",
                            "rent_time": 29740,
                            "rent_start_cost": "2023-02-04 09:08:29",
                            "rent_end_cost": "2023-02-04 17:24:09",
                            "rent_time_cost": 29740,
                            "type": "events_volume",
                            "resources": {
                                "name": "test1",
                                "disks_type": "ssd",
                                "size": 1,
                            },
                            "tid_start": "63de208cc037717bc232206c",
                            "tid_end": "63de94b9c037717bc232206f",
                            "cost_total": 992,
                        },
                        {
                            "rent_start": "2023-02-05 14:50:48",
                            "rent_end": "2023-02-05 14:52:26",
                            "rent_time": 98,
                            "rent_start_cost": "2023-02-05 14:50:48",
                            "rent_end_cost": "2023-02-05 14:52:26",
                            "rent_time_cost": 98,
                            "type": "events_resource",
                            "resources": {
                                "name": "test1",
                                "entity": "nvidia-pytorch",
                                "cpu": 1,
                                "memory": 2,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63dfc248c037717bc2322079",
                            "tid_end": "63dfc2a9c037717bc232207c",
                            "cost_total": 30,
                        },
                        {
                            "rent_start": "2023-02-05 14:54:49",
                            "rent_end": "2023-02-07 14:13:51",
                            "rent_time": 170342,
                            "rent_start_cost": "2023-02-05 14:54:49",
                            "rent_end_cost": "2023-02-07 14:13:51",
                            "rent_time_cost": 170342,
                            "type": "events_resource",
                            "resources": {
                                "name": "test1",
                                "entity": "nvidia-pytorch",
                                "cpu": 1,
                                "memory": 2,
                                "gpu": 0,
                                "gpu_type": None,
                            },
                            "tid_start": "63dfc338c037717bc232207e",
                            "tid_end": "63e25c9fc037717bc2322083",
                            "cost_total": 42585,
                        },
                    ],
                },
            ],
        },
        "message": "{'namespace': 'pytest', 'cost_total': 75665.4, 'details': [{'user_id': 'e57c8668-6bc3-47c7-85de-903bfc3772b7', 'details': [{'rent_start': '2023-02-03 16:25:17', 'rent_end': '2023-02-09 10:15:24', 'rent_time': 496207.06346, 'rent_start_cost': '2023-02-03 16:25:17', 'rent_end_cost': '2023-02-09 10:15:24', 'rent_time_cost': 496207.06346, 'type': 'events_resource', 'resources': {'name': 'test', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 1, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63dd356cc037717bc2322053', 'tid_end': None, 'cost_total': 1654.0}, {'rent_start': '2023-02-03 16:58:38', 'rent_end': '2023-02-09 10:15:24', 'rent_time': 494206.064514, 'rent_start_cost': '2023-02-03 16:58:38', 'rent_end_cost': '2023-02-09 10:15:24', 'rent_time_cost': 494206.064514, 'type': 'events_volume', 'resources': {'name': 'test2', 'disks_type': 'ssd', 'size': 1.0}, 'tid_start': '63dd3d3dc037717bc2322069', 'tid_end': None, 'cost_total': 823.7}, {'rent_start': '2023-02-07 14:33:57', 'rent_end': '2023-02-09 10:15:24', 'rent_time': 157287.06558, 'rent_start_cost': '2023-02-07 14:33:57', 'rent_end_cost': '2023-02-09 10:15:24', 'rent_time_cost': 157287.06558, 'type': 'events_resource', 'resources': {'name': 'test', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63e26155c037717bc232208b', 'tid_end': None, 'cost_total': 786.3000000000001}, {'rent_start': '2023-02-08 13:57:02', 'rent_end': '2023-02-09 10:15:24', 'rent_time': 73102.066748, 'rent_start_cost': '2023-02-08 13:57:02', 'rent_end_cost': '2023-02-09 10:15:24', 'rent_time_cost': 73102.066748, 'type': 'events_resource', 'resources': {'name': 'test2', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63e3aa2dc037717bc2322097', 'tid_end': None, 'cost_total': 365.40000000000003}, {'rent_start': '2023-02-08 14:00:13', 'rent_end': '2023-02-09 10:15:24', 'rent_time': 72911.068128, 'rent_start_cost': '2023-02-08 14:00:13', 'rent_end_cost': '2023-02-09 10:15:24', 'rent_time_cost': 72911.068128, 'type': 'events_resource', 'resources': {'name': 'test2', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63e3aaecc037717bc232209c', 'tid_end': None, 'cost_total': 364.5}, {'rent_start': '2023-02-08 15:28:08', 'rent_end': '2023-02-09 10:15:24', 'rent_time': 67636.069558, 'rent_start_cost': '2023-02-08 15:28:08', 'rent_end_cost': '2023-02-09 10:15:24', 'rent_time_cost': 67636.069558, 'type': 'events_resource', 'resources': {'name': 'test2', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63e3bf88c037717bc23220a1', 'tid_end': None, 'cost_total': 338.1}, {'rent_start': '2023-02-02 15:24:01', 'rent_end': '2023-02-02 15:26:23', 'rent_time': 142.0, 'rent_start_cost': '2023-02-02 15:24:01', 'rent_end_cost': '2023-02-02 15:26:23', 'rent_time_cost': 142.0, 'type': 'events_volume', 'resources': {'name': 'duzy', 'disks_type': 'ssd', 'size': 1.0}, 'tid_start': '63dbd597c037717bc232200a', 'tid_end': '63dbd61fc037717bc232200d', 'cost_total': 0.2}, {'rent_start': '2023-02-02 15:40:52', 'rent_end': '2023-02-02 15:44:50', 'rent_time': 238.0, 'rent_start_cost': '2023-02-02 15:40:52', 'rent_end_cost': '2023-02-02 15:44:50', 'rent_time_cost': 238.0, 'type': 'events_volume', 'resources': {'name': 'duzy', 'disks_type': 'ssd', 'size': 1.0}, 'tid_start': '63dbd983c037717bc2322015', 'tid_end': '63dbda71c037717bc2322019', 'cost_total': 0.4}, {'rent_start': '2023-02-02 15:32:50', 'rent_end': '2023-02-03 15:38:32', 'rent_time': 86742.0, 'rent_start_cost': '2023-02-02 15:32:50', 'rent_end_cost': '2023-02-03 15:38:32', 'rent_time_cost': 86742.0, 'type': 'events_resource', 'resources': {'name': 'test', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 1, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63dbd7a1c037717bc232200f', 'tid_end': '63dd2a77c037717bc2322041', 'cost_total': 289.2}, {'rent_start': '2023-02-03 15:38:53', 'rent_end': '2023-02-03 16:06:05', 'rent_time': 1632.0, 'rent_start_cost': '2023-02-03 15:38:53', 'rent_end_cost': '2023-02-03 16:06:05', 'rent_time_cost': 1632.0, 'type': 'events_resource', 'resources': {'name': 'test', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63dd2a8dc037717bc2322043', 'tid_end': '63dd30edc037717bc232204b', 'cost_total': 8.100000000000001}, {'rent_start': '2023-02-03 16:06:13', 'rent_end': '2023-02-03 16:18:49', 'rent_time': 756.0, 'rent_start_cost': '2023-02-03 16:06:13', 'rent_end_cost': '2023-02-03 16:18:49', 'rent_time_cost': 756.0, 'type': 'events_resource', 'resources': {'name': 'filebrowser', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 1, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63dd30f4c037717bc232204d', 'tid_end': '63dd33e8c037717bc2322050', 'cost_total': 2.6}, {'rent_start': '2023-02-03 16:30:11', 'rent_end': '2023-02-03 16:33:25', 'rent_time': 194.0, 'rent_start_cost': '2023-02-03 16:30:11', 'rent_end_cost': '2023-02-03 16:33:25', 'rent_time_cost': 194.0, 'type': 'events_resource', 'resources': {'name': 'test3', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 1, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63dd3692c037717bc232205b', 'tid_end': '63dd3754c037717bc232205e', 'cost_total': 0.6000000000000001}, {'rent_start': '2023-02-03 16:53:52', 'rent_end': '2023-02-03 16:58:32', 'rent_time': 280.0, 'rent_start_cost': '2023-02-03 16:53:52', 'rent_end_cost': '2023-02-03 16:58:32', 'rent_time_cost': 280.0, 'type': 'events_volume', 'resources': {'name': 'test2', 'disks_type': 'ssd', 'size': 1.0}, 'tid_start': '63dd3c20c037717bc2322063', 'tid_end': '63dd3d38c037717bc2322067', 'cost_total': 0.5}, {'rent_start': '2023-02-02 14:03:20', 'rent_end': '2023-02-08 14:00:06', 'rent_time': 518206.0, 'rent_start_cost': '2023-02-02 14:03:20', 'rent_end_cost': '2023-02-08 14:00:06', 'rent_time_cost': 518206.0, 'type': 'events_resource', 'resources': {'name': 'test2', 'entity': 'nvidia-pytorch', 'cpu': 1, 'memory': 1, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63dbc2a8c037717bc2322001', 'tid_end': '63e3aae6c037717bc232209a', 'cost_total': 1727.4}, {'rent_start': '2023-02-03 16:30:03', 'rent_end': '2023-02-08 15:27:22', 'rent_time': 428239.0, 'rent_start_cost': '2023-02-03 16:30:03', 'rent_end_cost': '2023-02-08 15:27:22', 'rent_time_cost': 428239.0, 'type': 'events_resource', 'resources': {'name': 'test2', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 1, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63dd368ac037717bc2322058', 'tid_end': '63e3bf59c037717bc232209f', 'cost_total': 1427.4}]}, {'user_id': '9a8b327c-1f27-4d79-a387-071cd0954cf9', 'details': [{'rent_start': '2023-01-03 12:40:08', 'rent_end': '2023-02-09 10:15:24', 'rent_time': 3188116.118518, 'rent_start_cost': '2023-02-01 00:00:00', 'rent_end_cost': '2023-02-09 10:15:24', 'rent_time_cost': 728124.118518, 'type': 'events_volume', 'resources': {'name': 'test', 'disks_type': 'ssd', 'size': 1}, 'tid_start': '63dd00a8c037717bc232201d', 'tid_end': None, 'cost_total': 24270}, {'rent_start': '2023-02-04 09:08:29', 'rent_end': '2023-02-04 17:24:09', 'rent_time': 29740.0, 'rent_start_cost': '2023-02-04 09:08:29', 'rent_end_cost': '2023-02-04 17:24:09', 'rent_time_cost': 29740.0, 'type': 'events_volume', 'resources': {'name': 'test1', 'disks_type': 'ssd', 'size': 1.0}, 'tid_start': '63de208cc037717bc232206c', 'tid_end': '63de94b9c037717bc232206f', 'cost_total': 992.0}, {'rent_start': '2023-02-05 14:50:48', 'rent_end': '2023-02-05 14:52:26', 'rent_time': 98.0, 'rent_start_cost': '2023-02-05 14:50:48', 'rent_end_cost': '2023-02-05 14:52:26', 'rent_time_cost': 98.0, 'type': 'events_resource', 'resources': {'name': 'test1', 'entity': 'nvidia-pytorch', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63dfc248c037717bc2322079', 'tid_end': '63dfc2a9c037717bc232207c', 'cost_total': 30}, {'rent_start': '2023-02-05 14:54:49', 'rent_end': '2023-02-07 14:13:51', 'rent_time': 170342.0, 'rent_start_cost': '2023-02-05 14:54:49', 'rent_end_cost': '2023-02-07 14:13:51', 'rent_time_cost': 170342.0, 'type': 'events_resource', 'resources': {'name': 'test1', 'entity': 'nvidia-pytorch', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63dfc338c037717bc232207e', 'tid_end': '63e25c9fc037717bc2322083', 'cost_total': 42585}]}]}",
        "code": 200,
        "time_stamp": "2023-02-09 12:28:28 ",
    }
    test_billing_invoice = (
        2023,
        1,
        {
            "status": "Success",
            "reason": "BILLING_INVOICE",
            "details": {
                "namespace": "pytest",
                "cost_total": 87508.3,
                "invoice": [
                    {
                        "user_id": "e57c8668-6bc3-47c7-85de-903bfc3772b7",
                        "month": 1,
                        "year": 2023,
                        "cost_total": 5508.300000000001,
                        "details": [
                            {
                                "rent_start": "2022-12-09 10:23:04",
                                "rent_end": "2023-01-13 11:50:18",
                                "rent_time": 3029234,
                                "rent_start_cost": "2023-01-01 00:00:00",
                                "rent_end_cost": "2023-01-13 11:50:18",
                                "rent_time_cost": 1079418,
                                "type": "events_resource",
                                "resources": {
                                    "name": "test",
                                    "entity": "tensorflow-jupyter",
                                    "cpu": 1,
                                    "memory": 2,
                                    "gpu": 0,
                                    "gpu_type": None,
                                },
                                "tid_start": "63930c8a0fd5a2fe98fe5d51",
                                "tid_end": "63c14579c037717bc2321fad",
                                "cost_total": 5397,
                            },
                            {
                                "rent_start": "2023-01-16 12:01:17",
                                "rent_end": "2023-01-16 13:09:10",
                                "rent_time": 4073,
                                "rent_start_cost": "2023-01-16 12:01:17",
                                "rent_end_cost": "2023-01-16 13:09:10",
                                "rent_time_cost": 4073,
                                "type": "events_resource",
                                "resources": {
                                    "name": "test1",
                                    "entity": "datascience-jupyter",
                                    "cpu": 1,
                                    "memory": 2,
                                    "gpu": 0,
                                    "gpu_type": None,
                                },
                                "tid_start": "63c53c8cc037717bc2321fc6",
                                "tid_end": "63c54c75c037717bc2321fd5",
                                "cost_total": 20.400000000000002,
                            },
                            {
                                "rent_start": "2023-01-16 11:59:47",
                                "rent_end": "2023-01-16 13:16:21",
                                "rent_time": 4594,
                                "rent_start_cost": "2023-01-16 11:59:47",
                                "rent_end_cost": "2023-01-16 13:16:21",
                                "rent_time_cost": 4594,
                                "type": "events_resource",
                                "resources": {
                                    "name": "test12",
                                    "entity": "datascience-jupyter",
                                    "cpu": 1,
                                    "memory": 2,
                                    "gpu": 0,
                                    "gpu_type": None,
                                },
                                "tid_start": "63c53c32c037717bc2321fc4",
                                "tid_end": "63c54e25c037717bc2321fe0",
                                "cost_total": 23.1,
                            },
                            {
                                "rent_start": "2023-01-16 12:49:05",
                                "rent_end": "2023-01-16 13:16:30",
                                "rent_time": 1645,
                                "rent_start_cost": "2023-01-16 12:49:05",
                                "rent_end_cost": "2023-01-16 13:16:30",
                                "rent_time_cost": 1645,
                                "type": "events_resource",
                                "resources": {
                                    "name": "test12324",
                                    "entity": "datascience-jupyter",
                                    "cpu": 1,
                                    "memory": 2,
                                    "gpu": 0,
                                    "gpu_type": None,
                                },
                                "tid_start": "63c547c1c037717bc2321fcb",
                                "tid_end": "63c54e2dc037717bc2321fe4",
                                "cost_total": 8.100000000000001,
                            },
                            {
                                "rent_start": "2023-01-16 13:09:59",
                                "rent_end": "2023-01-16 13:16:41",
                                "rent_time": 402,
                                "rent_start_cost": "2023-01-16 13:09:59",
                                "rent_end_cost": "2023-01-16 13:16:41",
                                "rent_time_cost": 402,
                                "type": "events_resource",
                                "resources": {
                                    "name": "test123243222",
                                    "entity": "datascience-jupyter",
                                    "cpu": 1,
                                    "memory": 2,
                                    "gpu": 0,
                                    "gpu_type": None,
                                },
                                "tid_start": "63c54ca6c037717bc2321fd6",
                                "tid_end": "63c54e38c037717bc2321fe6",
                                "cost_total": 2.1,
                            },
                            {
                                "rent_start": "2023-01-16 13:17:57",
                                "rent_end": "2023-01-16 13:40:29",
                                "rent_time": 1352,
                                "rent_start_cost": "2023-01-16 13:17:57",
                                "rent_end_cost": "2023-01-16 13:40:29",
                                "rent_time_cost": 1352,
                                "type": "events_resource",
                                "resources": {
                                    "name": "test5",
                                    "entity": "datascience-jupyter",
                                    "cpu": 1,
                                    "memory": 2,
                                    "gpu": 0,
                                    "gpu_type": None,
                                },
                                "tid_start": "63c54e85c037717bc2321fe8",
                                "tid_end": "63c553ccc037717bc2321ff5",
                                "cost_total": 6.9,
                            },
                            {
                                "rent_start": "2023-01-16 13:28:41",
                                "rent_end": "2023-01-16 13:40:32",
                                "rent_time": 711,
                                "rent_start_cost": "2023-01-16 13:28:41",
                                "rent_end_cost": "2023-01-16 13:40:32",
                                "rent_time_cost": 711,
                                "type": "events_resource",
                                "resources": {
                                    "name": "test6",
                                    "entity": "datascience-jupyter",
                                    "cpu": 1,
                                    "memory": 2,
                                    "gpu": 0,
                                    "gpu_type": None,
                                },
                                "tid_start": "63c55109c037717bc2321feb",
                                "tid_end": "63c553d0c037717bc2321ff7",
                                "cost_total": 3.6000000000000005,
                            },
                            {
                                "rent_start": "2023-01-16 13:38:10",
                                "rent_end": "2023-01-16 13:40:35",
                                "rent_time": 145,
                                "rent_start_cost": "2023-01-16 13:38:10",
                                "rent_end_cost": "2023-01-16 13:40:35",
                                "rent_time_cost": 145,
                                "type": "events_resource",
                                "resources": {
                                    "name": "test7",
                                    "entity": "datascience-jupyter",
                                    "cpu": 1,
                                    "memory": 2,
                                    "gpu": 0,
                                    "gpu_type": None,
                                },
                                "tid_start": "63c55341c037717bc2321ff2",
                                "tid_end": "63c553d3c037717bc2321ff9",
                                "cost_total": 0.6000000000000001,
                            },
                            {
                                "rent_start": "2023-01-16 11:06:03",
                                "rent_end": "2023-01-16 13:40:46",
                                "rent_time": 9283,
                                "rent_start_cost": "2023-01-16 11:06:03",
                                "rent_end_cost": "2023-01-16 13:40:46",
                                "rent_time_cost": 9283,
                                "type": "events_resource",
                                "resources": {
                                    "name": "test",
                                    "entity": "datascience-jupyter",
                                    "cpu": 1,
                                    "memory": 2,
                                    "gpu": 0,
                                    "gpu_type": None,
                                },
                                "tid_start": "63c52f9bc037717bc2321fb5",
                                "tid_end": "63c553ddc037717bc2321ffb",
                                "cost_total": 46.5,
                            },
                        ],
                    },
                    {
                        "user_id": "9a8b327c-1f27-4d79-a387-071cd0954cf9",
                        "month": 1,
                        "year": 2023,
                        "cost_total": 82000,
                        "details": [
                            {
                                "rent_start": "2023-01-03 12:40:08",
                                "rent_end": "2023-02-09 10:19:06",
                                "rent_time": 3188338.545678,
                                "rent_start_cost": "2023-01-03 12:40:08",
                                "rent_end_cost": "2023-01-31 23:59:59",
                                "rent_time_cost": 2459991,
                                "type": "events_volume",
                                "resources": {
                                    "name": "test",
                                    "disks_type": "ssd",
                                    "size": 1,
                                },
                                "tid_start": "63dd00a8c037717bc232201d",
                                "tid_end": None,
                                "cost_total": 82000,
                            }
                        ],
                    },
                ],
                "date_requested": {"year": 2023, "month": 1},
            },
            "message": "{'namespace': 'pytest', 'cost_total': 87508.3, 'invoice': [{'user_id': 'e57c8668-6bc3-47c7-85de-903bfc3772b7', 'month': 1, 'year': 2023, 'cost_total': 5508.300000000001, 'details': [{'rent_start': '2022-12-09 10:23:04', 'rent_end': '2023-01-13 11:50:18', 'rent_time': 3029234.0, 'rent_start_cost': '2023-01-01 00:00:00', 'rent_end_cost': '2023-01-13 11:50:18', 'rent_time_cost': 1079418.0, 'type': 'events_resource', 'resources': {'name': 'test', 'entity': 'tensorflow-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63930c8a0fd5a2fe98fe5d51', 'tid_end': '63c14579c037717bc2321fad', 'cost_total': 5397.0}, {'rent_start': '2023-01-16 12:01:17', 'rent_end': '2023-01-16 13:09:10', 'rent_time': 4073.0, 'rent_start_cost': '2023-01-16 12:01:17', 'rent_end_cost': '2023-01-16 13:09:10', 'rent_time_cost': 4073.0, 'type': 'events_resource', 'resources': {'name': 'test1', 'entity': 'datascience-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63c53c8cc037717bc2321fc6', 'tid_end': '63c54c75c037717bc2321fd5', 'cost_total': 20.400000000000002}, {'rent_start': '2023-01-16 11:59:47', 'rent_end': '2023-01-16 13:16:21', 'rent_time': 4594.0, 'rent_start_cost': '2023-01-16 11:59:47', 'rent_end_cost': '2023-01-16 13:16:21', 'rent_time_cost': 4594.0, 'type': 'events_resource', 'resources': {'name': 'test12', 'entity': 'datascience-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63c53c32c037717bc2321fc4', 'tid_end': '63c54e25c037717bc2321fe0', 'cost_total': 23.1}, {'rent_start': '2023-01-16 12:49:05', 'rent_end': '2023-01-16 13:16:30', 'rent_time': 1645.0, 'rent_start_cost': '2023-01-16 12:49:05', 'rent_end_cost': '2023-01-16 13:16:30', 'rent_time_cost': 1645.0, 'type': 'events_resource', 'resources': {'name': 'test12324', 'entity': 'datascience-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63c547c1c037717bc2321fcb', 'tid_end': '63c54e2dc037717bc2321fe4', 'cost_total': 8.100000000000001}, {'rent_start': '2023-01-16 13:09:59', 'rent_end': '2023-01-16 13:16:41', 'rent_time': 402.0, 'rent_start_cost': '2023-01-16 13:09:59', 'rent_end_cost': '2023-01-16 13:16:41', 'rent_time_cost': 402.0, 'type': 'events_resource', 'resources': {'name': 'test123243222', 'entity': 'datascience-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63c54ca6c037717bc2321fd6', 'tid_end': '63c54e38c037717bc2321fe6', 'cost_total': 2.1}, {'rent_start': '2023-01-16 13:17:57', 'rent_end': '2023-01-16 13:40:29', 'rent_time': 1352.0, 'rent_start_cost': '2023-01-16 13:17:57', 'rent_end_cost': '2023-01-16 13:40:29', 'rent_time_cost': 1352.0, 'type': 'events_resource', 'resources': {'name': 'test5', 'entity': 'datascience-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63c54e85c037717bc2321fe8', 'tid_end': '63c553ccc037717bc2321ff5', 'cost_total': 6.9}, {'rent_start': '2023-01-16 13:28:41', 'rent_end': '2023-01-16 13:40:32', 'rent_time': 711.0, 'rent_start_cost': '2023-01-16 13:28:41', 'rent_end_cost': '2023-01-16 13:40:32', 'rent_time_cost': 711.0, 'type': 'events_resource', 'resources': {'name': 'test6', 'entity': 'datascience-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63c55109c037717bc2321feb', 'tid_end': '63c553d0c037717bc2321ff7', 'cost_total': 3.6000000000000005}, {'rent_start': '2023-01-16 13:38:10', 'rent_end': '2023-01-16 13:40:35', 'rent_time': 145.0, 'rent_start_cost': '2023-01-16 13:38:10', 'rent_end_cost': '2023-01-16 13:40:35', 'rent_time_cost': 145.0, 'type': 'events_resource', 'resources': {'name': 'test7', 'entity': 'datascience-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63c55341c037717bc2321ff2', 'tid_end': '63c553d3c037717bc2321ff9', 'cost_total': 0.6000000000000001}, {'rent_start': '2023-01-16 11:06:03', 'rent_end': '2023-01-16 13:40:46', 'rent_time': 9283.0, 'rent_start_cost': '2023-01-16 11:06:03', 'rent_end_cost': '2023-01-16 13:40:46', 'rent_time_cost': 9283.0, 'type': 'events_resource', 'resources': {'name': 'test', 'entity': 'datascience-jupyter', 'cpu': 1, 'memory': 2, 'gpu': 0, 'gpu_type': None}, 'tid_start': '63c52f9bc037717bc2321fb5', 'tid_end': '63c553ddc037717bc2321ffb', 'cost_total': 46.5}]}, {'user_id': '9a8b327c-1f27-4d79-a387-071cd0954cf9', 'month': 1, 'year': 2023, 'cost_total': 82000, 'details': [{'rent_start': '2023-01-03 12:40:08', 'rent_end': '2023-02-09 10:19:06', 'rent_time': 3188338.545678, 'rent_start_cost': '2023-01-03 12:40:08', 'rent_end_cost': '2023-01-31 23:59:59', 'rent_time_cost': 2459991.0, 'type': 'events_volume', 'resources': {'name': 'test', 'disks_type': 'ssd', 'size': 1}, 'tid_start': '63dd00a8c037717bc232201d', 'tid_end': None, 'cost_total': 82000}]}], 'date_requested': {'year': 2023, 'month': 1}}",
            "code": 200,
            "time_stamp": "2023-02-10 10:58:38 ",
        },
    )
    test_billing_invoice_empty = (
        2022,
        11,
        {
            "status": "Success",
            "reason": "BILLING_INVOICE",
            "details": {
                "namespace": "pytest",
                "cost_total": 0,
                "invoice": [
                    {
                        "user_id": "e57c8668-6bc3-47c7-85de-903bfc3772b7",
                        "month": 11,
                        "year": 2022,
                        "cost_total": 0,
                        "details": [],
                    }
                ],
                "date_requested": {"year": 2022, "month": 11},
            },
            "message": "{'namespace': 'pytest', 'cost_total': 0, 'invoice': [{'user_id': 'e57c8668-6bc3-47c7-85de-903bfc3772b7', 'month': 11, 'year': 2022, 'cost_total': 0, 'details': []}], 'date_requested': {'year': 2022, 'month': 11}}",
            "code": 200,
            "time_stamp": "2023-02-10 11:01:44 ",
        },
    )
    test_billing_stop_events_resource = {
        "status": "Success",
        "reason": "LIST_COMPUTE_STOP_EVENTS",
        "details": {
            "event_list": [
                {
                    "event_id": "634e539ee2dc201119f13f97",
                    "date_created": "2022-10-18 07:19:59",
                    "event_name": "test",
                    "entity": "tensorflow-jupyter",
                }
            ]
        },
        "message": "{'event_list': [{'event_id': '634e539ee2dc201119f13f97', 'date_created': '2022-10-18 07:19:59', 'event_name': 'test', 'entity': 'tensorflow-jupyter'}]}",
        "code": 200,
        "time_stamp": "2023-02-06 13:28:39 ",
    }
    test_billing_stop_events_volume = {
        "status": "Success",
        "reason": "LIST_STORAGE_STOP_EVENTS",
        "details": {
            "event_list": [
                {
                    "event_id": "634e56219d191111d613b1b8",
                    "date_created": "2022-10-18 07:30:36",
                    "volume_name": "test-volume2",
                    "disks_type": "ssd",
                    "access_type": "rwx",
                    "size": 1,
                }
            ]
        },
        "message": "{'event_list': [{'event_id': '634e56219d191111d613b1b8', 'date_created': '2022-10-18 07:30:36', 'volume_name': 'test-volume2', 'disks_type': 'ssd', 'access_type': 'rwx', 'size': 1}]}",
        "code": 200,
        "time_stamp": "2023-02-06 13:28:39 ",
    }
    test_billing_no_stop_events_volume = {
        "status": "Success",
        "reason": "LIST_STORAGE_STOP_EVENTS",
        "details": {"event_list": []},
        "message": "{'event_list': []}",
        "code": 200,
        "time_stamp": "2023-02-06 13:28:39 ",
    }
    test_billing_no_stop_events_resource = {
        "status": "Success",
        "reason": "LIST_COMPUTE_STOP_EVENTS",
        "details": {"event_list": []},
        "message": "{'event_list': []}",
        "code": 200,
        "time_stamp": "2023-02-06 13:28:39 ",
    }
    test_fill_missing_values_in_response = [
        {
            "name": "filebrowser",
            "type": "filebrowser",
            "status": "Running",
            "volumes mounted": [],
            "cpu": "200m",
            "ram": "1Gi",
            "app token": "9bb9c88f8fc14eadba5c5fbdafc06275",
            "url": "https://filebrowser.pytest.dev.quantdevlabs.com",
        },
        {
            "name": "test1",
            "type": "tensorflow-jupyter",
            "status": "Running",
            "volumes mounted": [],
            "cpu": "1",
            "ram": "2Gi",
            "gpu type": "V100",
            "gpu count": "1",
            "app token": "8323da5cca244088af934983a592d0b8",
            "url": "https://test1.pytest.dev.quantdevlabs.com/tree/?token=8323da5cca244088af934983a592d0b8",
        },
    ]
    test_tabulate_a_response = [
        [
            ("name", "filebrowser"),
            ("type", "filebrowser"),
            ("status", "Running"),
            ("volumes mounted", []),
            ("cpu cores", "200m"),
            ("ram", "1Gi"),
            ("app token", "9bb9c88f8fc14eadba5c5fbdafc06275"),
            ("gpu type", None),
            ("gpu count", None),
            ("url", "https://filebrowser.pytest.dev.quantdevlabs.com"),
        ],
        [
            ("name", "test1"),
            ("type", "tensorflow-jupyter"),
            ("status", "Running"),
            ("volumes mounted", []),
            ("cpu cores", 1),
            ("ram", "2Gi"),
            ("app token", "8323da5cca244088af934983a592d0b8"),
            ("gpu type", "V100"),
            ("gpu count", 1),
            (
                "url",
                "https://test1.pytest.dev.quantdevlabs.com/tree/?token=8323da5cca244088af934983a592d0b8",
            ),
        ],
    ]
    test_tabulate_a_response_empty = [[("missing_labels", "roberta-5476f5bcb7-cqnq8")]]
    test_tabulate_a_response_empty_and_full_in_2_lists = [
        [("missing_labels", "roberta-5476f5bcb7-cqnq8")],
        [
            ("name", "test1"),
            ("type", "tensorflow-jupyter"),
            ("status", "Running"),
            ("volumes mounted", []),
            ("cpu cores", 1),
            ("ram", "2Gi"),
            ("app token", "8323da5cca244088af934983a592d0b8"),
            ("gpu type", "V100"),
            ("gpu count", 1),
            (
                "url",
                "https://test1.pytest.dev.quantdevlabs.com/tree/?token=8323da5cca244088af934983a592d0b8",
            ),
        ],
    ]
    test_fill_missing_values_in_response_empty_and_full_in_2_lists = [
        {
            "name": "test1",
            "type": "tensorflow-jupyter",
            "status": "Running",
            "volumes mounted": [],
            "cpu": "1",
            "ram": "2Gi",
            "gpu type": "V100",
            "gpu count": "1",
            "app token": "8323da5cca244088af934983a592d0b8",
            "url": "https://test1.pytest.dev.quantdevlabs.com/tree/?token=8323da5cca244088af934983a592d0b8",
        },
    ]
    test_compute_delete = {
        "status": "Success",
        "reason": "COMPUTE_DELETE",
        "details": {
            "namespace": "pytest",
            "modified_ingress": {
                "name": "pytest-ingress",
                "labels": None,
                "rules": [
                    "test2.pytest.dev.quantdevlabs.com",
                    "filebrowser.pytest.dev.quantdevlabs.com",
                ],
            },
            "deleted_service": {"name": "test1"},
            "deleted_template": {
                "status": "Success",
                "kind": "deployments",
                "name": "test1",
            },
        },
        "message": "{'namespace': 'pytest', 'modified_ingress': {'name': 'pytest-ingress', 'labels': None, 'rules': \
                ['test2.pytest.dev.quantdevlabs.com', 'filebrowser.pytest.dev.quantdevlabs.com']}, 'deleted_service': {'name': 'test1'},\
                'deleted_template': {'status': 'Success', 'kind': 'deployments', 'name': 'test1'}}",
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_compute_create_no_volume_found = {
        "status": "Success",
        "reason": "COMPUTE_CREATE",
        "details": {
            "namespace": "pytest",
            "created_template": {
                "name": "test",
                "labels": {"entity": "tensorflow-jupyter"},
                "pod_url": "https://test.pytest.dev.quantdevlabs.com",
                "replicas": 1,
                "app_token": "2da1723c002f467881aabd10c66e54cf",
            },
            "mount_requested": ["test-test"],
            "mounted_pvc_list": [],
            "mount_start_path": "/tf",
            "mount_status": "PVC NOT FOUND",
            "created_service": {
                "name": "test",
                "labels": {"entity": "tensorflow-jupyter"},
                "ports": [{"port": 8888, "protocol": "TCP"}],
            },
            "modified_certificate": {
                "warning": "running in development mode, not managing certificate"
            },
            "modified_ingress": {
                "name": "pytest-ingress",
                "labels": None,
                "rules": [
                    "filebrowser.pytest.dev.quantdevlabs.com",
                    "test.pytest.dev.quantdevlabs.com",
                ],
            },
        },
        "message": "{'namespace': 'pytest', 'created_template': {'name': 'test', 'labels': {'entity': 'tensorflow-jupyter'}, 'pod_url': 'https://test.pytest.dev.quantdevlabs.com', 'replicas': 1, 'app_token': '2da1723c002f467881aabd10c66e54cf'}, 'mount_start_path': '/tf', 'mounted_pvc_list': [], 'status': 'PVC NOT FOUND', 'created_service': {'name': 'test', 'labels': {'entity': 'tensorflow-jupyter'}, 'ports': [{'port': 8888, 'protocol': 'TCP'}]}, 'modified_certificate': {'warning': 'running in development mode, not managing certificate'}, 'modified_ingress': {'name': 'pytest-ingress', 'labels': None, 'rules': ['filebrowser.pytest.dev.quantdevlabs.com', 'test.pytest.dev.quantdevlabs.com']}}",
        "code": 200,
        "time_stamp": "2023-02-06 13:28:39 ",
    }
    test_compute_template_list = {
        "status": "Success",
        "reason": "RESOURCE_LIST_AVAILABLE_TEMPLATES",
        "details": {
            "namespace": "pytest",
            "available_templates_list": [
                "tensorflow-jupyter",
                "datascience-jupyter",
                "nvidia-rapids",
                "nvidia-pytorch",
                "nvidia-tensorflow",
            ],
        },
        "message": "{'namespace': 'pytest', 'available_templates_list': ['tensorflow-jupyter', 'datascience-jupyter', 'nvidia-rapids', 'nvidia-pytorch', 'nvidia-tensorflow']}",
        "code": 200,
        "time_stamp": "2023-02-14 09:52:38 ",
    }
    test_compute_create = {
        "status": "Success",
        "reason": "COMPUTE_CREATE",
        "details": {
            "namespace": "pytest",
            "created_template": {
                "name": "test1",
                "labels": {"entity": "nvidia-pytorch"},
                "pod_url": "https://test1.pytest.dev.quantdevlabs.com",
                "replicas": 1,
                "app_token": "1ce03c31ab9c40df8594d97b301eaaea",
            },
            "created_service": {
                "name": "test1",
                "labels": {"entity": "nvidia-pytorch"},
                "ports": [{"port": 8888, "protocol": "TCP"}],
            },
            "modified_certificate": {
                "warning": "running in development mode, not managing certificate"
            },
            "modified_ingress": {
                "name": "pytest-ingress",
                "labels": None,
                "rules": [
                    "test2.pytest.dev.quantdevlabs.com",
                    "filebrowser.pytest.dev.quantdevlabs.com",
                    "test1.pytest.dev.quantdevlabs.com",
                ],
            },
        },
        "message": "{'namespace': 'pytest', 'created_template': {'name': 'test1', 'labels': {'entity': 'nvidia-pytorch'}, 'pod_url': 'https://test1.pytest.dev.quantdevlabs.com', 'replicas': 1, 'app_token': '1ce03c31ab9c40df8594d97b301eaaea'}, 'created_service': {'name': 'test1', 'labels': {'entity': 'nvidia-pytorch'}, 'ports': [{'port': 8888, 'protocol': 'TCP'}]}, 'modified_certificate': {'warning': 'running in development mode, not managing certificate'}, 'modified_ingress': {'name': 'pytest-ingress', 'labels': None, 'rules': ['test2.pytest.dev.quantdevlabs.com', 'filebrowser.pytest.dev.quantdevlabs.com', 'test1.pytest.dev.quantdevlabs.com']}}",
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_compute_create_filebrowser = {
        "status": "Success",
        "reason": "COMPUTE_CREATE",
        "details": {
            "namespace": "pytest",
            "created_template": {
                "name": "filebrowser",
                "labels": {"entity": "filebrowser"},
                "pod_url": "https://filebrowser.pytest.dev.quantdevlabs.com",
                "replicas": 1,
                "puid": "0",
                "pgid": "0",
                "app_token": "9bb9c88f8fc14eadba5c5fbdafc06275",
            },
            "created_service": {
                "name": "filebrowser",
                "labels": {"entity": "filebrowser"},
                "ports": [{"port": 8080, "protocol": "TCP"}],
            },
            "modified_certificate": {
                "warning": "running in development mode, not managing certificate"
            },
            "modified_ingress": {
                "name": "pytest-ingress",
                "labels": None,
                "rules": [
                    "test2.pytest.dev.quantdevlabs.com",
                    "filebrowser.pytest.dev.quantdevlabs.com",
                ],
            },
        },
        "message": "{'namespace': 'pytest', 'created_template': \
            {'name': 'filebrowser', 'labels': {'entity': 'filebrowser'}, \
            'pod_url': 'https://filebrowser.pytest.dev.quantdevlabs.com', \
            'replicas': 1, 'puid': '0', 'pgid': '0', 'app_token': '9bb9c88f8fc14eadba5c5fbdafc06275'},\
            'created_service': {'name': 'filebrowser', 'labels': {'entity': 'filebrowser'},\
            'ports': [{'port': 8080, 'protocol': 'TCP'}]}, 'modified_certificate':\
            {'warning': 'running in development mode, not managing certificate'},\
            'modified_ingress': {'name': 'pytest-ingress', 'labels': None,\
            'rules': ['test2.pytest.dev.quantdevlabs.com', 'filebrowser.pytest.dev.quantdevlabs.com']}}",
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_compute_list_empty = {
        "status": "Success",
        "reason": "RESOURCE_LIST",
        "details": {
            "namespace": "pytest",
            "pods_list": [],
        },
        "message": "{'namespace': 'pytest', 'pods_list': []]}",
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_compute_list_no_labels = {
        "status": "Success",
        "reason": "RESOURCE_LIST",
        "details": {
            "namespace": "comtegra",
            "pods_list": [
                {
                    "labels": {"gpu-count": "2", "gpu-label": "A100"},
                    "name": "roberta-5476f5bcb7-cqnq8",
                    "status": "Running",
                    "status_reasons": [],
                    "containers": [
                        {
                            "name": "roberta",
                            "type": "nvidia-pytorch",
                            "status": "Running",
                            "volumes_mounted": None,
                            "cpu": "16",
                            "ram": "20Gi",
                            "gpu-count": "2",
                            "gpu-label": "A100",
                        },
                        {
                            "name": "samplea5000",
                            "type": "nvidia-tensorflow",
                            "status": "Running",
                            "volumes_mounted": None,
                            "cpu": "8",
                            "ram": "20Gi",
                            "gpu-count": "2",
                            "gpu-label": "A5000",
                        },
                        {
                            "name": "test-cpu",
                            "type": "nvidia-pytorch",
                            "status": "Running",
                            "volumes_mounted": None,
                            "cpu": "2",
                            "ram": "2Gi",
                        },
                        {
                            "name": "ts-ds",
                            "type": "tensorflow-jupyter",
                            "status": "Running",
                            "volumes_mounted": "ds-jup",
                            "cpu": "2",
                            "ram": "8Gi",
                            "gpu-count": "1",
                            "gpu-label": "A5000",
                        },
                        {
                            "name": "nvidia-pytorch",
                            "resources": {
                                "limits": {
                                    "comtegra.cloud/a100": "2",
                                    "cpu": "16",
                                    "memory": "20Gi",
                                    "nvidia.com/gpu": "2",
                                },
                                "requests": {
                                    "comtegra.cloud/a100": "2",
                                    "cpu": "16",
                                    "ephemeral-storage": "20Gi",
                                    "memory": "20Gi",
                                    "nvidia.com/gpu": "2",
                                },
                            },
                            "command": [
                                "sh",
                                "-c",
                                "jupyter-lab --allow-root; sleep 5; sync; tail -f /dev/null;",
                            ],
                            "mounts": [
                                {
                                    "name": None,
                                    "mount_name": "kube-api-access-5kgf2",
                                    "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                                    "read_only": True,
                                    "type": None,
                                }
                            ],
                        },
                    ],
                },
                {
                    "labels": {"gpu-count": "2", "gpu-label": "A5000"},
                    "name": "samplea5000-59fcd69bd7-n2q4x",
                    "status": "Running",
                    "status_reasons": [],
                    "containers": [
                        {
                            "name": "nvidia-tensorflow",
                            "resources": {
                                "limits": {
                                    "comtegra.cloud/a5000": "2",
                                    "cpu": "8",
                                    "memory": "20Gi",
                                    "nvidia.com/gpu": "2",
                                },
                                "requests": {
                                    "comtegra.cloud/a5000": "2",
                                    "cpu": "8",
                                    "ephemeral-storage": "20Gi",
                                    "memory": "20Gi",
                                    "nvidia.com/gpu": "2",
                                },
                            },
                            "command": [
                                "sh",
                                "-c",
                                "jupyter-lab --allow-root; sleep 5; sync; tail -f /dev/null;",
                            ],
                            "mounts": [
                                {
                                    "name": None,
                                    "mount_name": "kube-api-access-gpdvf",
                                    "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                                    "read_only": True,
                                    "type": None,
                                }
                            ],
                        }
                    ],
                },
                {
                    "labels": {},
                    "name": "test-cpu-7f7c597465-xvqtj",
                    "status": "Running",
                    "status_reasons": [],
                    "containers": [
                        {
                            "name": "nvidia-pytorch",
                            "resources": {
                                "limits": {
                                    "cpu": "2",
                                    "memory": "2Gi",
                                    "nvidia.com/gpu": "0",
                                },
                                "requests": {
                                    "cpu": "2",
                                    "ephemeral-storage": "20Gi",
                                    "memory": "2Gi",
                                    "nvidia.com/gpu": "0",
                                },
                            },
                            "command": [
                                "sh",
                                "-c",
                                "jupyter-lab --allow-root; sleep 5; sync; tail -f /dev/null;",
                            ],
                            "mounts": [
                                {
                                    "name": None,
                                    "mount_name": "kube-api-access-xcqdx",
                                    "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                                    "read_only": True,
                                    "type": None,
                                }
                            ],
                        }
                    ],
                },
                {
                    "labels": {"gpu-count": "1", "gpu-label": "A5000"},
                    "name": "ts-ds-7977d46c87-w9mcv",
                    "status": "Running",
                    "status_reasons": [],
                    "containers": [
                        {
                            "name": "tensorflow-jupyter",
                            "resources": {
                                "limits": {
                                    "comtegra.cloud/a5000": "1",
                                    "cpu": "2",
                                    "memory": "8Gi",
                                    "nvidia.com/gpu": "1",
                                },
                                "requests": {
                                    "comtegra.cloud/a5000": "1",
                                    "cpu": "2",
                                    "ephemeral-storage": "20Gi",
                                    "memory": "6656Mi",
                                    "nvidia.com/gpu": "1",
                                },
                            },
                            "mounts": [
                                {
                                    "name": "ds-jup",
                                    "mount_name": "vol-ds-jup",
                                    "mount_path": "/tf/ds-jup",
                                    "read_only": False,
                                    "type": "PVC",
                                },
                                {
                                    "name": None,
                                    "mount_name": "kube-api-access-rfz89",
                                    "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                                    "read_only": True,
                                    "type": None,
                                },
                            ],
                        }
                    ],
                },
            ],
        },
        "message": "{'namespace': 'comtegra', 'pods_list': [{'labels': {'app-name': 'roberta', 'app-token': 'b381ea4162bc40d1bbc3ecbc24aa2b57', 'entity': 'nvidia-pytorch', 'gpu-count': '2', 'gpu-label': 'A100', 'pod-template-hash': '5476f5bcb7', 'pod_url': 'https://roberta.comtegra.cgc-waw-01.comtegra.cloud'}, 'name': 'roberta-5476f5bcb7-cqnq8', 'status': 'Running', 'status_reasons': [], 'containers': [{'name': 'nvidia-pytorch', 'resources': {'limits': {'comtegra.cloud/a100': '2', 'cpu': '16', 'memory': '20Gi', 'nvidia.com/gpu': '2'}, 'requests': {'comtegra.cloud/a100': '2', 'cpu': '16', 'ephemeral-storage': '20Gi', 'memory': '20Gi', 'nvidia.com/gpu': '2'}}, 'command': ['sh', '-c', 'jupyter-lab --allow-root; sleep 5; sync; tail -f /dev/null;'], 'mounts': [{'name': None, 'mount_name': 'kube-api-access-5kgf2', 'mount_path': '/var/run/secrets/kubernetes.io/serviceaccount', 'read_only': True, 'type': None}]}]}, {'labels': {'app-name': 'samplea5000', 'app-token': '95a79c8539714391bd4d9e378a1db396', 'entity': 'nvidia-tensorflow', 'gpu-count': '2', 'gpu-label': 'A5000', 'pod-template-hash': '59fcd69bd7', 'pod_url': 'https://samplea5000.comtegra.cgc-waw-01.comtegra.cloud'}, 'name': 'samplea5000-59fcd69bd7-n2q4x', 'status': 'Running', 'status_reasons': [], 'containers': [{'name': 'nvidia-tensorflow', 'resources': {'limits': {'comtegra.cloud/a5000': '2', 'cpu': '8', 'memory': '20Gi', 'nvidia.com/gpu': '2'}, 'requests': {'comtegra.cloud/a5000': '2', 'cpu': '8', 'ephemeral-storage': '20Gi', 'memory': '20Gi', 'nvidia.com/gpu': '2'}}, 'command': ['sh', '-c', 'jupyter-lab --allow-root; sleep 5; sync; tail -f /dev/null;'], 'mounts': [{'name': None, 'mount_name': 'kube-api-access-gpdvf', 'mount_path': '/var/run/secrets/kubernetes.io/serviceaccount', 'read_only': True, 'type': None}]}]}, {'labels': {'app-name': 'test-cpu', 'app-token': '6d08710f52c14eb9a2baf2138dfdf5c6', 'entity': 'nvidia-pytorch', 'pod-template-hash': '7f7c597465', 'pod_url': 'https://test-cpu.comtegra.cgc-waw-01.comtegra.cloud'}, 'name': 'test-cpu-7f7c597465-xvqtj', 'status': 'Running', 'status_reasons': [], 'containers': [{'name': 'nvidia-pytorch', 'resources': {'limits': {'cpu': '2', 'memory': '2Gi', 'nvidia.com/gpu': '0'}, 'requests': {'cpu': '2', 'ephemeral-storage': '20Gi', 'memory': '2Gi', 'nvidia.com/gpu': '0'}}, 'command': ['sh', '-c', 'jupyter-lab --allow-root; sleep 5; sync; tail -f /dev/null;'], 'mounts': [{'name': None, 'mount_name': 'kube-api-access-xcqdx', 'mount_path': '/var/run/secrets/kubernetes.io/serviceaccount', 'read_only': True, 'type': None}]}]}, {'labels': {'app-name': 'ts-ds', 'app-token': '9306a143694644bd8f4b74d3968c234b', 'entity': 'tensorflow-jupyter', 'gpu-count': '1', 'gpu-label': 'A5000', 'pod-template-hash': '7977d46c87', 'pod_url': 'https://ts-ds.comtegra.cgc-waw-01.comtegra.cloud'}, 'name': 'ts-ds-7977d46c87-w9mcv', 'status': 'Running', 'status_reasons': [], 'containers': [{'name': 'tensorflow-jupyter', 'resources': {'limits': {'comtegra.cloud/a5000': '1', 'cpu': '2', 'memory': '8Gi', 'nvidia.com/gpu': '1'}, 'requests': {'comtegra.cloud/a5000': '1', 'cpu': '2', 'ephemeral-storage': '20Gi', 'memory': '6656Mi', 'nvidia.com/gpu': '1'}}, 'mounts': [{'name': 'ds-jup', 'mount_name': 'vol-ds-jup', 'mount_path': '/tf/ds-jup', 'read_only': False, 'type': 'PVC'}, {'name': None, 'mount_name': 'kube-api-access-rfz89', 'mount_path': '/var/run/secrets/kubernetes.io/serviceaccount', 'read_only': True, 'type': None}]}]}]}",
        "code": 200,
        "time_stamp": "2023-02-16 10:39:08 ",
    }
    test_get_app_list_not_detailed = [
        {
            "labels": {
                "app-name": "filebrowser",
                "app-token": "9bb9c88f8fc14eadba5c5fbdafc06275",
                "entity": "filebrowser",
                "pod-template-hash": "657459b486",
                "pod_url": "https://filebrowser.pytest.dev.quantdevlabs.com",
            },
            "name": "filebrowser-657459b486-j5m85",
            "status": "Running",
            "status_reasons": [],
            "containers": [
                {
                    "name": "filebrowser",
                    "resources": {
                        "limits": {"cpu": "200m", "memory": "1Gi"},
                        "requests": {"cpu": "200m", "memory": "1Gi"},
                    },
                    "mounts": [
                        {
                            "name": "filebrowser-config",
                            "mount_name": "filebrowser-config",
                            "mount_path": "/config",
                            "read_only": False,
                            "type": "CONFIG_MAP",
                        },
                        {
                            "name": None,
                            "mount_name": "local-db",
                            "mount_path": "/database",
                            "read_only": False,
                            "type": "EMPTY_DIR",
                        },
                        {
                            "name": None,
                            "mount_name": "kube-api-access-skg57",
                            "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                            "read_only": True,
                            "type": None,
                        },
                    ],
                }
            ],
            "init_containers": [
                {
                    "name": "filebrowser-init",
                    "resources": {
                        "limits": {"cpu": "200m", "memory": "1Gi"},
                        "requests": {
                            "cpu": "200m",
                            "ephemeral-storage": "5Gi",
                            "memory": "1Gi",
                        },
                    },
                },
                [
                    {
                        "name": "kube-api-access-skg57",
                        "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                    }
                ],
            ],
        },
        {
            "labels": {
                "app-name": "test1",
                "app-token": "8323da5cca244088af934983a592d0b8",
                "entity": "tensorflow-jupyter",
                "gpu-count": "1",
                "gpu-label": "V100",
                "pod-template-hash": "7b889569fd",
                "pod_url": "https://test1.pytest.dev.quantdevlabs.com",
            },
            "name": "test1-7b889569fd-lxsmj",
            "status": "Running",
            "status_reasons": [],
            "containers": [
                {
                    "name": "tensorflow-jupyter",
                    "resources": {
                        "limits": {
                            "comtegra.cloud/v100": "1",
                            "cpu": "1",
                            "memory": "2Gi",
                            "nvidia.com/gpu": "1",
                        },
                        "requests": {
                            "comtegra.cloud/v100": "1",
                            "cpu": "400m",
                            "ephemeral-storage": "20Gi",
                            "memory": "858993459200m",
                            "nvidia.com/gpu": "1",
                        },
                    },
                    "mounts": [
                        {
                            "name": None,
                            "mount_name": "kube-api-access-nvpcz",
                            "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                            "read_only": True,
                            "type": None,
                        }
                    ],
                }
            ],
        },
    ]
    test_get_app_list = [
        {
            "labels": {
                "app-name": "filebrowser",
                "app-token": "9bb9c88f8fc14eadba5c5fbdafc06275",
                "entity": "filebrowser",
                "pod-template-hash": "657459b486",
                "pod_url": "https://filebrowser.pytest.dev.quantdevlabs.com",
            },
            "name": "filebrowser-657459b486-j5m85",
            "status": "Running",
            "status_reasons": [],
            "containers": [
                {
                    "name": "filebrowser",
                    "resources": {
                        "limits": {"cpu": "200m", "memory": "1Gi"},
                        "requests": {"cpu": "200m", "memory": "1Gi"},
                    },
                    "mounts": [
                        {
                            "name": "filebrowser-config",
                            "mount_name": "filebrowser-config",
                            "mount_path": "/config",
                            "read_only": False,
                            "type": "CONFIG_MAP",
                        },
                        {
                            "name": None,
                            "mount_name": "local-db",
                            "mount_path": "/database",
                            "read_only": False,
                            "type": "EMPTY_DIR",
                        },
                        {
                            "name": None,
                            "mount_name": "kube-api-access-skg57",
                            "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                            "read_only": True,
                            "type": None,
                        },
                    ],
                }
            ],
            "init_containers": [
                {
                    "name": "filebrowser-init",
                    "resources": {
                        "limits": {"cpu": "200m", "memory": "1Gi"},
                        "requests": {
                            "cpu": "200m",
                            "ephemeral-storage": "5Gi",
                            "memory": "1Gi",
                        },
                    },
                },
                [
                    {
                        "name": "kube-api-access-skg57",
                        "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                    }
                ],
            ],
        },
        {
            "labels": {
                "app-name": "test1",
                "app-token": "8323da5cca244088af934983a592d0b8",
                "entity": "tensorflow-jupyter",
                "gpu-count": "1",
                "gpu-label": "V100",
                "pod-template-hash": "7b889569fd",
                "pod_url": "https://test1.pytest.dev.quantdevlabs.com",
            },
            "name": "test1-7b889569fd-lxsmj",
            "status": "Running",
            "status_reasons": [],
            "containers": [
                {
                    "name": "tensorflow-jupyter",
                    "resources": {
                        "limits": {
                            "comtegra.cloud/v100": "1",
                            "cpu": "1",
                            "memory": "2Gi",
                            "nvidia.com/gpu": "1",
                        },
                        "requests": {
                            "comtegra.cloud/v100": "1",
                            "cpu": "400m",
                            "ephemeral-storage": "20Gi",
                            "memory": "858993459200m",
                            "nvidia.com/gpu": "1",
                        },
                    },
                    "mounts": [
                        {
                            "name": None,
                            "mount_name": "kube-api-access-nvpcz",
                            "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                            "read_only": True,
                            "type": None,
                        }
                    ],
                }
            ],
        },
    ]
    test_get_app_list_missing_labels = [
        {
            "labels": {"gpu-count": "2", "gpu-label": "A100"},
            "name": "roberta-5476f5bcb7-cqnq8",
            "status": "Running",
            "status_reasons": [],
            "containers": [
                {
                    "name": "roberta",
                    "type": "nvidia-pytorch",
                    "status": "Running",
                    "volumes_mounted": None,
                    "cpu": "16",
                    "ram": "20Gi",
                    "gpu-count": "2",
                    "gpu-label": "A100",
                },
                {
                    "name": "nvidia-pytorch",
                    "resources": {
                        "limits": {
                            "comtegra.cloud/a100": "2",
                            "cpu": "16",
                            "memory": "20Gi",
                            "nvidia.com/gpu": "2",
                        },
                        "requests": {
                            "comtegra.cloud/a100": "2",
                            "cpu": "16",
                            "ephemeral-storage": "20Gi",
                            "memory": "20Gi",
                            "nvidia.com/gpu": "2",
                        },
                    },
                    "command": [
                        "sh",
                        "-c",
                        "jupyter-lab --allow-root; sleep 5; sync; tail -f /dev/null;",
                    ],
                    "mounts": [
                        {
                            "name": None,
                            "mount_name": "kube-api-access-5kgf2",
                            "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                            "read_only": True,
                            "type": None,
                        }
                    ],
                },
            ],
        }
    ]
    test_get_app_list_missing_and_correct_lables_in_2_pods = [
        {
            "labels": {
                "app-name": "test1",
                "app-token": "8323da5cca244088af934983a592d0b8",
                "entity": "tensorflow-jupyter",
                "gpu-count": "1",
                "gpu-label": "V100",
                "pod-template-hash": "7b889569fd",
                "pod_url": "https://test1.pytest.dev.quantdevlabs.com",
            },
            "name": "test1-7b889569fd-lxsmj",
            "status": "Running",
            "status_reasons": [],
            "containers": [
                {
                    "name": "tensorflow-jupyter",
                    "resources": {
                        "limits": {
                            "comtegra.cloud/v100": "1",
                            "cpu": "1",
                            "memory": "2Gi",
                            "nvidia.com/gpu": "1",
                        },
                        "requests": {
                            "comtegra.cloud/v100": "1",
                            "cpu": "400m",
                            "ephemeral-storage": "20Gi",
                            "memory": "858993459200m",
                            "nvidia.com/gpu": "1",
                        },
                    },
                    "mounts": [
                        {
                            "name": None,
                            "mount_name": "kube-api-access-nvpcz",
                            "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                            "read_only": True,
                            "type": None,
                        }
                    ],
                }
            ],
        },
        {
            "labels": {"gpu-count": "2", "gpu-label": "A100"},
            "name": "roberta-5476f5bcb7-cqnq8",
            "status": "Running",
            "status_reasons": [],
            "containers": [
                {
                    "name": "roberta",
                    "type": "nvidia-pytorch",
                    "status": "Running",
                    "volumes_mounted": None,
                    "cpu": "16",
                    "ram": "20Gi",
                    "gpu-count": "2",
                    "gpu-label": "A100",
                },
                {
                    "name": "nvidia-pytorch",
                    "resources": {
                        "limits": {
                            "comtegra.cloud/a100": "2",
                            "cpu": "16",
                            "memory": "20Gi",
                            "nvidia.com/gpu": "2",
                        },
                        "requests": {
                            "comtegra.cloud/a100": "2",
                            "cpu": "16",
                            "ephemeral-storage": "20Gi",
                            "memory": "20Gi",
                            "nvidia.com/gpu": "2",
                        },
                    },
                    "command": [
                        "sh",
                        "-c",
                        "jupyter-lab --allow-root; sleep 5; sync; tail -f /dev/null;",
                    ],
                    "mounts": [
                        {
                            "name": None,
                            "mount_name": "kube-api-access-5kgf2",
                            "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                            "read_only": True,
                            "type": None,
                        }
                    ],
                },
            ],
        },
    ]
    test_compute_list = {
        "status": "Success",
        "reason": "RESOURCE_LIST",
        "details": {
            "namespace": "pytest",
            "pods_list": [
                {
                    "labels": {
                        "app-name": "filebrowser",
                        "app-token": "9bb9c88f8fc14eadba5c5fbdafc06275",
                        "entity": "filebrowser",
                        "pod-template-hash": "657459b486",
                        "pod_url": "https://filebrowser.pytest.dev.quantdevlabs.com",
                    },
                    "name": "filebrowser-657459b486-j5m85",
                    "status": "Running",
                    "status_reasons": [],
                    "containers": [
                        {
                            "name": "filebrowser",
                            "resources": {
                                "limits": {"cpu": "200m", "memory": "1Gi"},
                                "requests": {"cpu": "200m", "memory": "1Gi"},
                            },
                            "mounts": [
                                {
                                    "name": "filebrowser-config",
                                    "mount_name": "filebrowser-config",
                                    "mount_path": "/config",
                                    "read_only": False,
                                    "type": "CONFIG_MAP",
                                },
                                {
                                    "name": None,
                                    "mount_name": "local-db",
                                    "mount_path": "/database",
                                    "read_only": False,
                                    "type": "EMPTY_DIR",
                                },
                                {
                                    "name": None,
                                    "mount_name": "kube-api-access-skg57",
                                    "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                                    "read_only": True,
                                    "type": None,
                                },
                            ],
                        }
                    ],
                    "init_containers": [
                        {
                            "name": "filebrowser-init",
                            "resources": {
                                "limits": {"cpu": "200m", "memory": "1Gi"},
                                "requests": {
                                    "cpu": "200m",
                                    "ephemeral-storage": "5Gi",
                                    "memory": "1Gi",
                                },
                            },
                        },
                        [
                            {
                                "name": "kube-api-access-skg57",
                                "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                            }
                        ],
                    ],
                },
                {
                    "labels": {
                        "app-name": "test1",
                        "app-token": "8323da5cca244088af934983a592d0b8",
                        "entity": "tensorflow-jupyter",
                        "gpu-count": "1",
                        "gpu-label": "V100",
                        "pod-template-hash": "7b889569fd",
                        "pod_url": "https://test1.pytest.dev.quantdevlabs.com",
                    },
                    "name": "test1-7b889569fd-lxsmj",
                    "status": "Running",
                    "status_reasons": [],
                    "containers": [
                        {
                            "name": "tensorflow-jupyter",
                            "resources": {
                                "limits": {
                                    "comtegra.cloud/v100": "1",
                                    "cpu": "1",
                                    "memory": "2Gi",
                                    "nvidia.com/gpu": "1",
                                },
                                "requests": {
                                    "comtegra.cloud/v100": "1",
                                    "cpu": "400m",
                                    "ephemeral-storage": "20Gi",
                                    "memory": "858993459200m",
                                    "nvidia.com/gpu": "1",
                                },
                            },
                            "mounts": [
                                {
                                    "name": None,
                                    "mount_name": "kube-api-access-nvpcz",
                                    "mount_path": "/var/run/secrets/kubernetes.io/serviceaccount",
                                    "read_only": True,
                                    "type": None,
                                }
                            ],
                        }
                    ],
                },
            ],
        },
    }
    test_compute_get_start_path = {
        "status": "Success",
        "reason": "COMPUTE_GET_START_PATH",
        "details": {
            "start_path": "/home/jovyan",
            "template_name": "datascience-jupyter",
        },
        "message": "{'start_path': '/home/jovyan', 'template_name': 'datascience-jupyter'}",
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_volume_unmount = {
        "status": "Success",
        "reason": "PVC_UNMOUNT",
        "details": {"namespace": "pytest", "pvc_name": "test1"},
        "message": "{'namespace': 'pytest', 'pvc_name': 'test1'}",
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_volume_mount = {
        "status": "Success",
        "reason": "PVC_MOUNT",
        "details": {
            "namespace": "pytest",
            "pvc_name": "test1",
            "target_template_name": "test",
            "mount_path": "/tf/test1",
        },
        "message": "{'namespace': 'pytest', 'pvc_name': 'test1', 'target_template_name': 'test', 'mount_path': '/tf/test1'}",
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_volume_delete = {
        "status": "Success",
        "reason": "PVC_DELETE",
        "details": {
            "namespace": "pytest",
            "pvc_name": "test1",
            "force_delete": False,
            "deployment_names": [],
            "statefulset_names": [],
            "unmount_deployment": [],
            "unmount_stateful_set": [],
            "volume_deleted": {
                "name": "test1",
                "access_type": ["ReadWriteMany"],
                "size": "1Gi",
                "volume_mode": "Filesystem",
            },
        },
        "message": "{'namespace': 'pytest', 'pvc_name': 'test1', 'force_delete': False, 'deployment_names': [], 'statefulset_names': [], 'unmount_deployment': [], 'unmount_stateful_set': [], 'volume_deleted': {'name': 'test1', 'access_type': ['ReadWriteMany'], 'size': '1Gi', 'volume_mode': 'Filesystem'}}",
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_volume_create = {
        "status": "Success",
        "reason": "PVC_CREATE",
        "details": {
            "namespace": "pytest",
            "volume_created": {
                "name": "test1",
                "access_type": ["ReadWriteMany"],
                "size": "1Gi",
                "volume_mode": "Filesystem",
                "status": "Pending",
                "disks_type": "SSD",
            },
        },
        "message": "{'namespace': 'pytest', 'volume_created': \
                {'name': 'test1', 'access_type': ['ReadWriteMany'], 'size': '1Gi', 'volume_mode': 'Filesystem',\
                'status': 'Pending', 'disks_type': 'SSD'}}",
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_volume_list_empty = {
        "status": "Success",
        "reason": "PVC_LIST",
        "details": {
            "namespace": "pytest",
            "volume_list": [],
        },
        "code": 200,
        "time_stamp": "2023-02-03 16:24:59 ",
    }
    test_volume_list = {
        "status": "Success",
        "reason": "PVC_LIST",
        "details": {
            "namespace": "pytest",
            "volume_list": [
                {
                    "name": "test",
                    "size": "1Gi",
                    "status": "Bound",
                    "access_types": ["ReadWriteMany"],
                    "used": "1.51M",
                    "mounted_to": [
                        "filebrowser-54b4f8bf9d-cxx4j",
                        "test2-9966f7b97-ztq59",
                    ],
                },
                {
                    "name": "test-kafka",
                    "size": "1Gi",
                    "status": "Bound",
                    "access_types": ["ReadWriteMany"],
                    "used": "1.41M",
                    "mounted_to": [],
                },
                {
                    "name": "test-volume",
                    "size": "1Gi",
                    "status": "Bound",
                    "access_types": ["ReadWriteMany"],
                    "used": "1.41M",
                    "mounted_to": [],
                },
                {
                    "name": "test2",
                    "size": "1Gi",
                    "status": "Bound",
                    "access_types": ["ReadWriteMany"],
                    "used": "1.41M",
                    "mounted_to": [],
                },
            ],
        },
        "message": "{'namespace': 'pytest', 'volume_list': [{'name': 'test', 'size': '1Gi', 'status': 'Bound', 'access_types': ['ReadWriteMany'], 'used': '1.51M', 'mounted_to': ['filebrowser-54b4f8bf9d-cxx4j', 'test2-9966f7b97-ztq59']}, {'name': 'test-kafka', 'size': '1Gi', 'status': 'Bound', 'access_types': ['ReadWriteMany'], 'used': '1.41M', 'mounted_to': []}, {'name': 'test-volume', 'size': '1Gi', 'status': 'Bound', 'access_types': ['ReadWriteMany'], 'used': '1.41M', 'mounted_to': []}, {'name': 'test2', 'size': '1Gi', 'status': 'Bound', 'access_types': ['ReadWriteMany'], 'used': '1.41M', 'mounted_to': []}]}",
        "code": 200,
        "time_stamp": "2023-02-10 13:12:49 ",
    }
    test_compute_restart = {
        "status": "Success",
        "reason": "COMPUTE_RESTART",
        "details": {"namespace": "pytest", "template_name": "test1", "replicas": 1},
        "message": "{'namespace': 'pytest', 'template_name': 'test1', 'replicas': 1}",
        "code": 200,
        "time_stamp": "2023-02-13 20:41:07 ",
    }
    test_fill_missing_values_in_response_empty = []


def get_desired_response_data(filename: str):
    with open(f"./cgc/tests/desired_responses/{filename}", "r") as f:
        return f.read()


class DesiredResponsesData:
    test_billing_status = get_desired_response_data("test_billing_status.txt")
    test_billing_invoice = get_desired_response_data("test_billing_invoice.txt")
    test_billing_invoice_empty = "[33mNo invoice found for 11.2022.[0m"
    test_billing_stop_events_resource = get_desired_response_data(
        "test_billing_stop_events_resource.txt"
    )
    test_billing_stop_events_volume = get_desired_response_data(
        "test_billing_stop_events_volume.txt"
    )
    test_billing_no_stop_events_volume = "[33mNo volume stop events to list.[0m"
    test_billing_no_stop_events_resource = "[33mNo compute stop events to list.[0m"
    test_volume_list = get_desired_response_data("test_volume_list.txt")
    test_volume_list_empty = "[33mNo volumes to list.[0m"
    test_volume_create = (
        "Volume test1 of size 1.0 GB on SSD created. Volume is ReadWriteMany."
    )
    test_volume_delete = "Volume test1 deleted."
    test_volume_unmount = "Volume test1 successfully unmounted from selected apps."
    test_volume_mount = (
        "Volume test1 successfully mounted to test, mount path: /tf/test1."
    )
    test_compute_get_start_path = "Start path for datascience-jupyter: /home/jovyan."
    test_compute_list_empty = "[33mNo apps to list.[0m"
    test_compute_list_no_labels = ""
    test_compute_create_filebrowser = (
        "Filebrowser creation started!\n"
        "Will be accessible at: https://filebrowser.pytest.dev.quantdevlabs.com\n"
        "Username: pytest\n"
        "Password: 9bb9c88f8fc14eadba5c5fbdafc06275"
    )
    test_compute_create = (
        "nvidia-pytorch app test1 creation started!\n"
        "Will be accessible at: https://test1.pytest.dev.quantdevlabs.com\n"
        "App token: 1ce03c31ab9c40df8594d97b301eaaea\n"
        "To monitor the startup status use command: cgc compute list"
    )
    test_compute_create_no_volume_found = "[33mVolume name not found in namespace.[0m"
    test_compute_delete = "App test1 and its service successfully deleted."
    test_compute_restart = "App test1 has been successfully restarted."
    test_compute_list = get_desired_response_data("test_compute_list.txt")
    test_compute_template_list = "Available templates: tensorflow-jupyter, datascience-jupyter, nvidia-rapids, nvidia-pytorch, nvidia-tensorflow"
    test_tabulate_a_response = get_desired_response_data("test_tabulate_response.txt")
    test_tabulate_a_response_empty = (
        "missing_labels\n------------------------\nroberta-5476f5bcb7-cqnq8"
    )
    test_tabulate_a_response_empty_and_full_in_2_lists = (
        "missing_labels\n------------------------\nroberta-5476f5bcb7-cqnq8\ntest1"
    )
    test_fill_missing_values_in_response = [
        [
            ("name", "filebrowser"),
            ("type", "filebrowser"),
            ("status", "Running"),
            ("volumes mounted", []),
            ("cpu", "200m"),
            ("ram", "1Gi"),
            ("gpu type", None),
            ("gpu count", None),
            ("app token", "9bb9c88f8fc14eadba5c5fbdafc06275"),
            ("url", "https://filebrowser.pytest.dev.quantdevlabs.com"),
        ],
        [
            ("name", "test1"),
            ("type", "tensorflow-jupyter"),
            ("status", "Running"),
            ("volumes mounted", []),
            ("cpu", "1"),
            ("ram", "2Gi"),
            ("gpu type", "V100"),
            ("gpu count", "1"),
            ("app token", "8323da5cca244088af934983a592d0b8"),
            (
                "url",
                "https://test1.pytest.dev.quantdevlabs.com/tree/?token=8323da5cca244088af934983a592d0b8",
            ),
        ],
    ]
    test_fill_missing_values_in_response_empty = []
    test_fill_missing_values_in_response_empty_and_full_in_2_lists = [
        [
            ("name", "test1"),
            ("type", "tensorflow-jupyter"),
            ("status", "Running"),
            ("volumes mounted", []),
            ("cpu", "1"),
            ("ram", "2Gi"),
            ("gpu type", "V100"),
            ("gpu count", "1"),
            ("app token", "8323da5cca244088af934983a592d0b8"),
            (
                "url",
                "https://test1.pytest.dev.quantdevlabs.com/tree/?token=8323da5cca244088af934983a592d0b8",
            ),
        ],
    ]
    test_get_app_list = [
        {
            "name": "filebrowser",
            "type": "filebrowser",
            "status": "Running",
            "volumes_mounted": None,
            "cpu": "200m",
            "ram": "1Gi",
            "app-token": "9bb9c88f8fc14eadba5c5fbdafc06275",
            "url": "https://filebrowser.pytest.dev.quantdevlabs.com",
        },
        {
            "name": "test1",
            "type": "tensorflow-jupyter",
            "status": "Running",
            "volumes_mounted": None,
            "cpu": "1",
            "ram": "2Gi",
            "gpu-label": "V100",
            "gpu-count": "1",
            "app-token": "8323da5cca244088af934983a592d0b8",
            "url": "https://test1.pytest.dev.quantdevlabs.com/?token=8323da5cca244088af934983a592d0b8",
        },
    ]
    test_get_app_list_not_detailed = [
        {
            "name": "filebrowser",
            "type": "filebrowser",
            "status": "Running",
            "volumes_mounted": None,
            "cpu": "200m",
            "ram": "1Gi",
            "url": "https://filebrowser.pytest.dev.quantdevlabs.com",
        },
        {
            "name": "test1",
            "type": "tensorflow-jupyter",
            "status": "Running",
            "volumes_mounted": None,
            "cpu": "1",
            "ram": "2Gi",
            "gpu-label": "V100",
            "gpu-count": "1",
            "url": "https://test1.pytest.dev.quantdevlabs.com",
        },
    ]
    test_get_app_list_missing_labels = []
    test_get_app_list_missing_and_correct_lables_in_2_pods = [
        {
            "name": "test1",
            "type": "tensorflow-jupyter",
            "status": "Running",
            "volumes_mounted": None,
            "cpu": "1",
            "ram": "2Gi",
            "gpu-label": "V100",
            "gpu-count": "1",
            "app-token": "8323da5cca244088af934983a592d0b8",
            "url": "https://test1.pytest.dev.quantdevlabs.com/?token=8323da5cca244088af934983a592d0b8",
        },
    ]
