@@ -320,9 +320,9 @@ def test_eb_put_event(self) -> None:
320
320
mock_dispatch_events = MagicMock ()
321
321
libeb .dispatch_events = mock_dispatch_events
322
322
323
- """
324
- Test if event entries are in the correct format when CREATE new records
325
- """
323
+ # ####
324
+ # Test if event entries are in the correct format when CREATE new records
325
+ # ####
326
326
metadata_pd = pd .json_normalize ([RECORD_1 ])
327
327
metadata_pd = sanitize_lab_metadata_df (metadata_pd )
328
328
persist_lab_metadata (metadata_pd , SHEET_YEAR )
@@ -332,9 +332,9 @@ def test_eb_put_event(self) -> None:
332
332
{
333
333
"action" : "CREATE" ,
334
334
"model" : "LIBRARY" ,
335
- "ref_id " : "lib.ULID" ,
335
+ "refId " : "lib.ULID" ,
336
336
"data" : {
337
- "library_id " : "L10001" ,
337
+ "libraryId " : "L10001" ,
338
338
}
339
339
}
340
340
]
@@ -349,9 +349,9 @@ def test_eb_put_event(self) -> None:
349
349
self .assertTrue (
350
350
is_expected_event_in_output (self , expected = event , output = [json .loads (i .get ('Detail' )) for i in arg ]))
351
351
352
- """
353
- Test if record are UPDATE and event entries are correct
354
- """
352
+ # ####
353
+ # Test if record are UPDATE and event entries are correct
354
+ # ####
355
355
updated_record_1 = RECORD_1 .copy ()
356
356
updated_record_1 ['Quality' ] = 'poor'
357
357
mock_dispatch_events .reset_mock ()
@@ -364,9 +364,9 @@ def test_eb_put_event(self) -> None:
364
364
{
365
365
"action" : "UPDATE" ,
366
366
"model" : "LIBRARY" ,
367
- "ref_id " : "lib.ULID" ,
367
+ "refId " : "lib.ULID" ,
368
368
"data" : {
369
- "library_id " : "L10001" ,
369
+ "libraryId " : "L10001" ,
370
370
}
371
371
},
372
372
]
@@ -380,10 +380,9 @@ def test_eb_put_event(self) -> None:
380
380
for event in expected_update_detail :
381
381
self .assertTrue (
382
382
is_expected_event_in_output (self , expected = event , output = [json .loads (i .get ('Detail' )) for i in arg ]))
383
-
384
- """
385
- Test if the record are DELETE and event entries are correct
386
- """
383
+ # ####
384
+ # Test if the record are DELETE and event entries are correct
385
+ # ####
387
386
mock_dispatch_events .reset_mock ()
388
387
empty_pd = metadata_pd .drop (0 ) # Remove the only one record data
389
388
persist_lab_metadata (empty_pd , SHEET_YEAR )
@@ -393,12 +392,13 @@ def test_eb_put_event(self) -> None:
393
392
{
394
393
"action" : "DELETE" ,
395
394
"model" : "LIBRARY" ,
396
- "ref_id " : "lib.ULID" ,
395
+ "refId " : "lib.ULID" ,
397
396
"data" : {
398
- "library_id " : "L10001" ,
397
+ "libraryId " : "L10001" ,
399
398
}
400
399
}
401
400
]
401
+
402
402
for entry in arg :
403
403
check_put_event_entries_format (self , entry )
404
404
check_put_event_value (self , entry = entry , source = "orcabus.metadatamanager" ,
0 commit comments