@@ -258,9 +258,9 @@ def test_xrd_block_lifecycle(admin_client, default_sample_dict):
258
258
259
259
web_block = response .json ["new_block_data" ]
260
260
assert "bokeh_plot_data" in web_block
261
- assert "processed_data " in web_block
261
+ assert "computed " in web_block
262
262
assert web_block ["wavelength" ] == 2.0
263
- assert "peak_data" in web_block ["processed_data " ]
263
+ assert "peak_data" in web_block ["computed " ]
264
264
assert "file_id" in web_block
265
265
assert web_block ["file_id" ] == file_id
266
266
assert web_block .get ("errors" ) is None
@@ -269,7 +269,7 @@ def test_xrd_block_lifecycle(admin_client, default_sample_dict):
269
269
db = block .to_db ()
270
270
# 'computed' keys should be dropped when loading from web
271
271
assert "bokeh_plot_data" not in db
272
- assert "processed_data " not in db
272
+ assert "computed " not in db
273
273
assert db ["wavelength" ] == 2.0
274
274
275
275
# But they should still be in the database
@@ -280,8 +280,8 @@ def test_xrd_block_lifecycle(admin_client, default_sample_dict):
280
280
assert response .json ["status" ] == "success"
281
281
assert "blocks_obj" in item_data
282
282
block = item_data ["blocks_obj" ][block_id ]
283
- assert "processed_data " in block
284
- assert "peak_data" in block ["processed_data " ]
283
+ assert "computed " in block
284
+ assert "peak_data" in block ["computed " ]
285
285
assert block ["wavelength" ] == 2.0
286
286
287
287
@@ -461,7 +461,7 @@ def test_create_sample_with_example_files(
461
461
assert response .json ["new_block_data" ]["bokeh_plot_data" ] is not None
462
462
463
463
if block_type == "xrd" :
464
- assert response .json ["new_block_data" ]["processed_data " ]["peak_data" ] is not None
464
+ assert response .json ["new_block_data" ]["computed " ]["peak_data" ] is not None
465
465
466
466
response = admin_client .get (f"/get-item-data/{ sample_id } " )
467
467
assert response .status_code == 200
@@ -472,4 +472,4 @@ def test_create_sample_with_example_files(
472
472
473
473
if block_type == "xrd" :
474
474
doc = database .items .find_one ({"item_id" : sample_id }, projection = {"blocks_obj" : 1 })
475
- assert doc ["blocks_obj" ][block_id ]["processed_data " ]["peak_data" ] is not None
475
+ assert doc ["blocks_obj" ][block_id ]["computed " ]["peak_data" ] is not None
0 commit comments