Skip to content

Commit 8759790

Browse files
committed
Add additional permissions for DPS in non-prod. Add RAVS ODS code. (#747)
* Add additional permissions for DPS in non-prod. Add RAVS ODS code. * Remove test which was asserting on the value of non-test data.
1 parent 8ea9751 commit 8759790

File tree

4 files changed

+39
-54
lines changed

4 files changed

+39
-54
lines changed

config/dev/permissions_config.json

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
[
22
{
33
"supplier": "DPSFULL",
4-
"permissions": ["COVID19.CRUDS", "FLU.CRUDS", "MMR.CRUDS", "RSV.CRUDS"],
4+
"permissions": [
5+
"COVID19.CRUDS",
6+
"FLU.CRUDS",
7+
"MMR.CRUDS",
8+
"RSV.CRUDS",
9+
"HPV.CRUDS",
10+
"MENACWY.CRUDS",
11+
"3IN1.CRUDS"
12+
],
513
"ods_codes": ["DPSFULL"]
614
},
715
{
816
"supplier": "DPSREDUCED",
9-
"permissions": ["COVID19.CRUD", "FLU.CRUD", "MMR.CRUD", "RSV.CRUD"],
17+
"permissions": [
18+
"COVID19.CRUDS",
19+
"FLU.CRUDS",
20+
"MMR.CRUDS",
21+
"RSV.CRUDS",
22+
"HPV.CRUDS",
23+
"MENACWY.CRUDS",
24+
"3IN1.CRUDS"
25+
],
1026
"ods_codes": ["DPSREDUCED"]
1127
},
1228
{
@@ -33,11 +49,7 @@
3349
{
3450
"supplier": "RAVS",
3551
"permissions": ["RSV.CRUDS", "MMR.CRUDS"],
36-
"ods_codes": ["X26"]
37-
},
38-
{
39-
"supplier": "AGEM-RAVS-Integration",
40-
"permissions": ["RSV.CRUDS", "MMR.CRUDS"]
52+
"ods_codes": ["X26", "X8E5B"]
4153
},
4254
{
4355
"supplier": "EMIS",
@@ -125,7 +137,6 @@
125137
"RSV.CRUDS",
126138
"HPV.CRUDS",
127139
"MENACWY.CRUDS",
128-
"PERTUSSIS.CRUDS",
129140
"3IN1.CRUDS"
130141
]
131142
},
@@ -138,16 +149,7 @@
138149
"RSV.CRUDS",
139150
"HPV.CRUDS",
140151
"MENACWY.CRUDS",
141-
"PERTUSSIS.CRUDS",
142152
"3IN1.CRUDS"
143153
]
144-
},
145-
{
146-
"supplier": "EVA",
147-
"ods_codes": ["8HA94"]
148-
},
149-
{
150-
"supplier": "SONAR",
151-
"ods_codes": ["8HK48"]
152154
}
153155
]

config/preprod/permissions_config.json

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
[
22
{
33
"supplier": "DPSFULL",
4-
"permissions": ["COVID19.CRUDS", "FLU.CRUDS", "MMR.CRUDS", "RSV.CRUDS"],
4+
"permissions": [
5+
"COVID19.CRUDS",
6+
"FLU.CRUDS",
7+
"MMR.CRUDS",
8+
"RSV.CRUDS",
9+
"HPV.CRUDS",
10+
"MENACWY.CRUDS",
11+
"3IN1.CRUDS"
12+
],
513
"ods_codes": ["DPSFULL"]
614
},
715
{
816
"supplier": "DPSREDUCED",
9-
"permissions": ["COVID19.CRUDS", "FLU.CRUDS", "MMR.CRUDS", "RSV.CRUDS"],
17+
"permissions": [
18+
"COVID19.CRUDS",
19+
"FLU.CRUDS",
20+
"MMR.CRUDS",
21+
"RSV.CRUDS",
22+
"HPV.CRUDS",
23+
"MENACWY.CRUDS",
24+
"3IN1.CRUDS"
25+
],
1026
"ods_codes": ["DPSREDUCED"]
1127
},
1228
{
@@ -23,11 +39,7 @@
2339
{
2440
"supplier": "RAVS",
2541
"permissions": ["RSV.CRUDS", "MMR.CRUDS"],
26-
"ods_codes": ["X26"]
27-
},
28-
{
29-
"supplier": "AGEM-RAVS-Integration",
30-
"permissions": ["RSV.CRUDS", "MMR.CRUDS"]
42+
"ods_codes": ["X26", "X8E5B"]
3143
},
3244
{
3345
"supplier": "EMIS",
@@ -71,7 +83,6 @@
7183
"RSV.CRUDS",
7284
"HPV.CRUDS",
7385
"MENACWY.CRUDS",
74-
"PERTUSSIS.CRUDS",
7586
"3IN1.CRUDS"
7687
]
7788
},
@@ -84,7 +95,6 @@
8495
"RSV.CRUDS",
8596
"HPV.CRUDS",
8697
"MENACWY.CRUDS",
87-
"PERTUSSIS.CRUDS",
8898
"3IN1.CRUDS"
8999
]
90100
},

config/prod/permissions_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"supplier": "RAVS",
1818
"permissions": ["RSV.RS"],
19-
"ods_codes": ["X26"]
19+
"ods_codes": ["X26", "X8E5B"]
2020
},
2121
{
2222
"supplier": "PINNACLE",

redis_sync/tests/test_transform_config.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,6 @@ def test_ods_code_to_supplier(self):
4343
result = transform_supplier_permissions(self.supplier_data)
4444
self.assertEqual(result["ods_code_to_supplier"], expected)
4545

46-
def test_dev_ods_code_to_supplier_dev(self):
47-
self.ods_code_to_supplier_file_tester("dev")
48-
49-
def test_dev_ods_code_to_supplier_preprod(self):
50-
self.ods_code_to_supplier_file_tester("preprod")
51-
52-
def test_dev_ods_code_to_supplier_prod(self):
53-
self.ods_code_to_supplier_file_tester("prod")
54-
55-
def ods_code_to_supplier_file_tester(self, env):
56-
with open("./tests/test_data/expected_ods_code_to_supplier.json") as expected_file:
57-
expected = json.load(expected_file)
58-
file_path = f"../config/{env}/permissions_config.json"
59-
60-
with open(file_path) as f:
61-
supplier_data = json.load(f)
62-
result = transform_supplier_permissions(supplier_data)
63-
result_data = result["ods_code_to_supplier"]
64-
if result_data != expected:
65-
# loop through all keys and values to find the mismatch
66-
for key in result_data:
67-
if key not in expected:
68-
print(f"Key: {key} not found")
69-
elif result_data[key] != expected[key]:
70-
print(f"Key: {key}, Result: {result_data[key]}, Expected: {expected[key]}")
71-
self.assertEqual(result_data, expected)
72-
7346
def test_empty_input(self):
7447
result = transform_supplier_permissions([])
7548
self.assertEqual(result, {

0 commit comments

Comments
 (0)