Skip to content

Commit

Permalink
Tweaked event log items
Browse files Browse the repository at this point in the history
  • Loading branch information
mroloux committed Feb 12, 2024
1 parent b1a4b8b commit 038ef6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions seatsio/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,8 @@ class EventLogItem:

def __init__(self, data):
self.id = data.get("id")
self.workspace_key = data.get("workspaceKey")
self.type = data.get("type")
self.date = parse_date(data.get("date"))
self.timestamp = parse_date(data.get("timestamp"))
self.data = data.get("data")

@classmethod
Expand Down
5 changes: 2 additions & 3 deletions tests/eventLog/testListEventLogItems.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ def test_properties(self):

assert_that(event_log_item.id > 0).is_true()
assert_that(event_log_item.type).is_equal_to("chart.created")
assert_that(event_log_item.workspace_key).is_equal_to(self.workspace.key)
assert_that(event_log_item.date).is_not_none()
assert_that(event_log_item.data).is_equal_to({"key": chart.key})
assert_that(event_log_item.timestamp).is_not_none()
assert_that(event_log_item.data).is_equal_to({"key": chart.key, "workspaceKey": self.workspace.key})

0 comments on commit 038ef6e

Please sign in to comment.