Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mock_dlt_message.py to have have mock storage timestamp #11

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))
Loading