@@ -22,7 +22,6 @@ class TestUpdateDatasetResourcesLogic:
2222 "Other Policy Relevant Indicators metadata" : "opri_metadata_zwe.csv" ,
2323 "Demographic and Socio-economic data" : "dem_data_zwe.csv" ,
2424 "Demographic and Socio-economic indicator list" : "dem_indicatorlist_zwe.csv" ,
25- "QuickCharts-SDG 4 Global and Thematic data" : "qc_sdg_data_zwe.csv" ,
2625 }
2726
2827 @pytest .fixture (scope = "function" )
@@ -109,17 +108,15 @@ def test_dataset_update_resources(
109108 statuses ,
110109 ) = dataset ._dataset_update_resources (True , True , True , True )
111110 assert resources_to_update == expected_resources_to_update
112- assert resources_to_delete == [8 , 2 , 1 , 0 ]
111+ assert resources_to_delete == [6 , 2 , 1 , 0 ]
113112 assert filestore_resources == {
114113 3 : fixture_path / "sdg_data_zwe.csv" ,
115114 4 : fixture_path / "sdg_indicatorlist_zwe.csv" ,
116115 5 : fixture_path / "sdg_metadata_zwe.csv" ,
117- 6 : fixture_path / "dem_data_zwe.csv" ,
118116 7 : fixture_path / "dem_indicatorlist_zwe.csv" ,
119- 9 : fixture_path / "opri_data_zwe.csv" ,
120- 10 : fixture_path / "opri_indicatorlist_zwe.csv" ,
121- 11 : fixture_path / "opri_metadata_zwe.csv" ,
122- 12 : fixture_path / "qc_sdg_data_zwe.csv" ,
117+ 8 : fixture_path / "opri_data_zwe.csv" ,
118+ 9 : fixture_path / "opri_indicatorlist_zwe.csv" ,
119+ 10 : fixture_path / "opri_metadata_zwe.csv" ,
123120 }
124121 assert new_resource_order == [
125122 ("SDG 4 Global and Thematic data" , "csv" ),
@@ -128,17 +125,13 @@ def test_dataset_update_resources(
128125 ("Other Policy Relevant Indicators data" , "csv" ),
129126 ("Other Policy Relevant Indicators indicator list" , "csv" ),
130127 ("Other Policy Relevant Indicators metadata" , "csv" ),
131- ("Demographic and Socio-economic data" , "csv" ),
132128 ("Demographic and Socio-economic indicator list" , "csv" ),
133- ("QuickCharts-SDG 4 Global and Thematic data" , "csv" ),
134129 ]
135130 assert statuses == {
136- "Demographic and Socio-economic data" : 2 ,
137131 "Demographic and Socio-economic indicator list" : 2 ,
138132 "Other Policy Relevant Indicators data" : 2 ,
139133 "Other Policy Relevant Indicators indicator list" : 2 ,
140134 "Other Policy Relevant Indicators metadata" : 2 ,
141- "QuickCharts-SDG 4 Global and Thematic data" : 2 ,
142135 "SDG 4 Global and Thematic data" : 2 ,
143136 "SDG 4 Global and Thematic indicator list" : 2 ,
144137 "SDG 4 Global and Thematic metadata" : 2 ,
@@ -162,12 +155,10 @@ def test_dataset_update_resources(
162155 "update__resources__0__upload" : fixture_path / "sdg_data_zwe.csv" ,
163156 "update__resources__1__upload" : fixture_path / "sdg_indicatorlist_zwe.csv" ,
164157 "update__resources__2__upload" : fixture_path / "sdg_metadata_zwe.csv" ,
165- "update__resources__3__upload" : fixture_path / "dem_data_zwe.csv" ,
166- "update__resources__4__upload" : fixture_path / "dem_indicatorlist_zwe.csv" ,
167- "update__resources__5__upload" : fixture_path / "opri_data_zwe.csv" ,
168- "update__resources__6__upload" : fixture_path / "opri_indicatorlist_zwe.csv" ,
169- "update__resources__7__upload" : fixture_path / "opri_metadata_zwe.csv" ,
170- "update__resources__8__upload" : fixture_path / "qc_sdg_data_zwe.csv" ,
158+ "update__resources__3__upload" : fixture_path / "dem_indicatorlist_zwe.csv" ,
159+ "update__resources__4__upload" : fixture_path / "opri_data_zwe.csv" ,
160+ "update__resources__5__upload" : fixture_path / "opri_indicatorlist_zwe.csv" ,
161+ "update__resources__6__upload" : fixture_path / "opri_metadata_zwe.csv" ,
171162 }
172163 resources = results ["update" ]["resources" ]
173164 cutdown_resources = []
@@ -209,14 +200,6 @@ def test_dataset_update_resources(
209200 "url" : "updated_by_file_upload_step" ,
210201 "url_type" : "upload" ,
211202 },
212- {
213- "dataset_preview_enabled" : "False" ,
214- "format" : "csv" ,
215- "name" : "Demographic and Socio-economic data" ,
216- "resource_type" : "file.upload" ,
217- "url" : "updated_by_file_upload_step" ,
218- "url_type" : "upload" ,
219- },
220203 {
221204 "dataset_preview_enabled" : "False" ,
222205 "format" : "csv" ,
@@ -249,14 +232,6 @@ def test_dataset_update_resources(
249232 "url" : "updated_by_file_upload_step" ,
250233 "url_type" : "upload" ,
251234 },
252- {
253- "dataset_preview_enabled" : "True" ,
254- "format" : "csv" ,
255- "name" : "QuickCharts-SDG 4 Global and Thematic data" ,
256- "resource_type" : "file.upload" ,
257- "url" : "updated_by_file_upload_step" ,
258- "url_type" : "upload" ,
259- },
260235 ]
261236
262237 def test_dataset_update_resources_position (
0 commit comments