@@ -441,91 +441,69 @@ def test_parse_bolus_entry_std_incomplete_partial(self):
441
441
"bolex_completion_time" : None ,
442
442
"bolex_start_time" : None
443
443
}))
444
-
445
- entryExtendedBolusComplete = {
446
- "actualTotalBolusRequested" : 0.4 ,
447
- "bg" : 131 ,
448
- "bolex" : {
449
- "size" : 0.2 ,
450
- "bolexStartDateTime" : "2022-08-09T23:20:04" ,
451
- "insulinDelivered" : {
452
- "completionDateTime" : "2022-08-09T23:35:03" ,
453
- "value" : 0.2
454
- },
455
- "iob" : 5.7 ,
456
- "completionStatusId" : 3 ,
457
- "completionStatusDesc" : "Completed" ,
458
- "extendedBolusIsComplete" : 1 ,
459
- "insulinRequested" : 0.2 ,
460
- "bolexCompletionId" : 16757133
461
- },
462
- "bolusRequestOptions" : "Extended" ,
463
- "bolusType" : "Carb" ,
464
- "carbSize" : 0 ,
465
- "correctionBolusSize" : 0 ,
466
- "correctionFactor" : 30 ,
467
- "declinedCorrection" : 0 ,
468
- "duration" : 15 ,
469
- "eventDateTime" : "2022-08-09T23:19:15" ,
470
- "eventHistoryReportDetails" : "CF 1:30 - Carb Ratio 1:6 - Target BG 110<br/>Override: Pump calculated Bolus = 0.0 units" ,
471
- "eventHistoryReportEventDesc" : "Food Bolus: 50% Extended 15 mins" ,
472
- "foodBolusSize" : 0 ,
473
- "iob" : 5.87 ,
474
- "isQuickBolus" : 0 ,
475
- "note" : {
476
- "id" : 0 ,
477
- "indexId" : "631597" ,
478
- "eventTypeId" : 64 ,
479
- "sourceRecordId" : 0 ,
480
- "eventId" : 0 ,
481
- "active" : False
482
- },
483
- "requestDateTime" : "2022-08-09T23:19:15" ,
484
- "standard" : {
485
- "insulinDelivered" : {
486
- "completionDateTime" : "2022-08-09T23:20:04" ,
487
- "value" : 0.2
488
- },
489
- "foodDelivered" : 0 ,
490
- "correctionDelivered" : 0 ,
491
- "insulinRequested" : 0.2 ,
492
- "completionStatusId" : 3 ,
493
- "completionStatusDesc" : "Completed" ,
494
- "bolusIsComplete" : 1 ,
495
- "bolusRequestId" : 3636 ,
496
- "bolusCompletionId" : 3636
497
- },
498
- "standardPercent" : 50 ,
499
- "targetBG" : 110 ,
500
- "userOverride" : 1 ,
501
- "type" : "Bolus" ,
502
- "description" : "Extended 50.00%/0.00" ,
503
- "sourceRecId" : 1209631944 ,
504
- "eventTypeId" : 0 ,
505
- "indexId" : 0 ,
506
- "uploadId" : 0 ,
507
- "interactive" : 0 ,
508
- "tempRateId" : 0 ,
509
- "tempRateCompleted" : 0 ,
510
- "tempRateActivated" : 0
444
+
445
+
446
+ entryExtendedComplete = {
447
+ "Type" : "Bolus" ,
448
+ "Description" : "Extended 50.00%/0.00" ,
449
+ "BG" : "131" ,
450
+ "IOB" : "5.87" ,
451
+ "BolusRequestID" : "3636.000" ,
452
+ "BolusCompletionID" : "3636.000" ,
453
+ "CompletionDateTime" : "2022-08-09T23:20:04" ,
454
+ "InsulinDelivered" : "0.20" ,
455
+ "FoodDelivered" : "0.00" ,
456
+ "CorrectionDelivered" : "0.00" ,
457
+ "CompletionStatusID" : "3" ,
458
+ "CompletionStatusDesc" : "Completed" ,
459
+ "BolusIsComplete" : "1" ,
460
+ "BolexCompletionID" : "16757133" ,
461
+ "BolexSize" : "0.20" ,
462
+ "BolexStartDateTime" : "2022-08-09T23:20:04" ,
463
+ "BolexCompletionDateTime" : "2022-08-09T23:35:03" ,
464
+ "BolexInsulinDelivered" : "0.20" ,
465
+ "BolexIOB" : "5.7" ,
466
+ "BolexCompletionStatusID" : "3.00" ,
467
+ "BolexCompletionStatusDesc" : "Completed" ,
468
+ "ExtendedBolusIsComplete" : "1" ,
469
+ "EventDateTime" : "2022-08-09T23:19:15" ,
470
+ "RequestDateTime" : "2022-08-09T23:19:15" ,
471
+ "BolusType" : "Carb" ,
472
+ "BolusRequestOptions" : "Extended" ,
473
+ "StandardPercent" : "50.00" ,
474
+ "Duration" : "15" ,
475
+ "CarbSize" : "0" ,
476
+ "UserOverride" : "1" ,
477
+ "TargetBG" : "110" ,
478
+ "CorrectionFactor" : "30.00" ,
479
+ "FoodBolusSize" : "0.00" ,
480
+ "CorrectionBolusSize" : "0.00" ,
481
+ "ActualTotalBolusRequested" : "0.40" ,
482
+ "IsQuickBolus" : "0" ,
483
+ "EventHistoryReportEventDesc" : "0" ,
484
+ "EventHistoryReportDetails" : "Food Bolus: 50% Extended 15 mins" ,
485
+ "NoteID" : "CF 1:30 - Carb Ratio 1:6 - Target BG 110 | Override: Pump calculated Bolus = 0.0 units" ,
486
+ "IndexID" : "0" ,
487
+ "Note" : "631597"
511
488
}
512
489
def test_parse_bolus_entry_extended_complete (self ):
513
490
self .assertEqual (
514
- TConnectEntry .parse_bolus_entry (self .entryExtendedBolusComplete ),
515
- Bolus (
516
- description = 'Extended 50.00%/0.00' ,
517
- complete = '1' ,
518
- completion = 'Completed' ,
519
- request_time = '2022-08-09 23:19:15-04:00' ,
520
- completion_time = '2022-08-09 23:20:04-04:00' ,
521
- insulin = '0.2' ,
522
- requested_insulin = '0.2' ,
523
- carbs = '0' ,
524
- bg = '131' ,
525
- user_override = '1' ,
526
- extended_bolus = '1' ,
527
- bolex_completion_time = '2022-08-09 23:35:03-04:00' ,
528
- bolex_start_time = '2022-08-09 23:20:04-04:00' ))
491
+ TConnectEntry .parse_bolus_entry (self .entryExtendedComplete ),
492
+ Bolus (** {
493
+ "description" : "Extended 50.00%/0.00" ,
494
+ "complete" : "1" ,
495
+ "completion" : "Completed" ,
496
+ "request_time" : None ,
497
+ "completion_time" : None ,
498
+ "insulin" : "0.20" ,
499
+ "requested_insulin" : "0.40" ,
500
+ "carbs" : "0" ,
501
+ "bg" : "131" ,
502
+ "user_override" : "1" ,
503
+ "extended_bolus" : "1" ,
504
+ "bolex_completion_time" : "2022-08-09 23:35:03-04:00" ,
505
+ "bolex_start_time" : "2022-08-09 23:20:04-04:00"
506
+ }))
529
507
530
508
531
509
0 commit comments