예제 #1
0
 def test_parse_basalsuspension_event_basalprofile_skipped(self):
     self.assertIsNone(
         TConnectEntry.parse_basalsuspension_event({
             'EventDateTime': '/Date(1638659343000-0000)/',
             'SuspendReason': 'basal-profile',
         })
     )
예제 #2
0
 def test_parse_basalsuspension_event_previous_skipped(self):
     self.assertIsNone(
         TConnectEntry.parse_basalsuspension_event({
             'Continuation': 'continuation',
             'EventDateTime': '/Date(1638604800000-0000)/',
             'SuspendReason': 'previous',
         })
     )
예제 #3
0
 def test_parse_basalsuspension_event_tempprofile(self):
     self.assertEqual(
         TConnectEntry.parse_basalsuspension_event({
             'EventDateTime': '/Date(1640541521000-0000)/',
             'SuspendReason': 'temp-profile'
         }),
         {
             "time": "2021-12-26 09:58:41-05:00",
             "event_type": "Basal Rate Change"
         }
     )
예제 #4
0
 def test_parse_basalsuspension_event_manual(self):
     self.assertEqual(
         TConnectEntry.parse_basalsuspension_event({
             'EventDateTime': '/Date(1638662852000-0000)/',
             'SuspendReason': 'manual'
         }),
         {
             "time": "2021-12-04 16:07:32-05:00",
             "event_type": "User Suspended"
         }
     )
예제 #5
0
 def test_parse_basalsuspension_event_alarm(self):
     self.assertEqual(
         TConnectEntry.parse_basalsuspension_event({
             'EventDateTime': '/Date(1637863616000-0000)/',
             'SuspendReason': 'alarm'
         }),
         {
             "time": "2021-11-25 10:06:56-05:00",
             "event_type": "Empty Cartridge/Pump Shutdown"
         }
     )
예제 #6
0
 def test_parse_basalsuspension_event_sitecart(self):
     self.assertEqual(
         TConnectEntry.parse_basalsuspension_event({
             'EventDateTime': '/Date(1638663490000-0000)/',
             'SuspendReason': 'site-cart'
         }),
         {
             "time": "2021-12-04 16:18:10-05:00",
             "event_type": "Site/Cartridge Change"
         }
     )