Skip to content

Commit

Permalink
Update mock_dlt_message.py (#12)
Browse files Browse the repository at this point in the history
Allows the capablites to have mock data which has a storage timestamp
  • Loading branch information
1Rennie authored May 8, 2024
1 parent eb290b6 commit b70a24e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/dltlyse/mock_dlt_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ class MockStorageHeader(object):
def __init__(self, msec=0, sec=0):
self.microseconds = msec
self.seconds = sec


class MockDLTMessageWithTime(MockDLTMessage):
"MockDLTMessage but with storage_timestamp"

@property
def storage_timestamp(self):
"""Fake storage timestamp"""
return float("{}.{}".format(self.storageheader.seconds, self.storageheader.microseconds))

0 comments on commit b70a24e

Please sign in to comment.