This repository was archived by the owner on Oct 29, 2024. It is now read-only.
File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1244,7 +1244,7 @@ def _parse_netloc(netloc):
1244
1244
1245
1245
def _msgpack_parse_hook (code , data ):
1246
1246
if code == 5 :
1247
- (epoch_s , epoch_ns ) = struct .unpack (">QI " , data )
1247
+ (epoch_s , epoch_ns ) = struct .unpack (">qi " , data )
1248
1248
timestamp = datetime .datetime .utcfromtimestamp (epoch_s )
1249
1249
timestamp += datetime .timedelta (microseconds = (epoch_ns / 1000 ))
1250
1250
return timestamp .isoformat () + 'Z'
Original file line number Diff line number Diff line change @@ -575,7 +575,8 @@ def test_query_msgpack(self):
575
575
example_response = bytes (bytearray .fromhex (
576
576
"81a7726573756c74739182ac73746174656d656e745f696400a673657269"
577
577
"65739183a46e616d65a161a7636f6c756d6e7392a474696d65a176a67661"
578
- "6c7565739192c70c05000000005d26178a019096c8cb3ff0000000000000"
578
+ "6c7565739292c70c05000000005d26178a019096c8cb3ff0000000000000"
579
+ "92c70c05fffffffffffee6c0ff439eb2cb4000000000000000"
579
580
))
580
581
581
582
with requests_mock .Mocker () as m :
@@ -590,7 +591,10 @@ def test_query_msgpack(self):
590
591
591
592
self .assertListEqual (
592
593
list (rs .get_points ()),
593
- [{'v' : 1.0 , 'time' : '2019-07-10T16:51:22.026253Z' }]
594
+ [
595
+ {"v" : 1.0 , "time" : "2019-07-10T16:51:22.026253Z" },
596
+ {"v" : 2.0 , "time" : "1969-12-31T03:59:59.987654Z" },
597
+ ],
594
598
)
595
599
596
600
def test_select_into_post (self ):
You can’t perform that action at this time.
0 commit comments