Skip to content

test(event): Add test with none in event_properties #44

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
8 changes: 8 additions & 0 deletions src/test/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ def test_base_event_set_bool_in_dict_attributes_success(self):
expect_dict["event_properties"] = {"bool_properties": bool_properties}
self.assertEqual(expect_dict, event.get_event_body())

def test_base_event_set_none_in_dict_attributes_success(self):
event = BaseEvent(event_type="test_event", user_id="test_user")
expect_dict = {"event_type": "test_event", "user_id": "test_user"}
none_properties = None
event["event_properties"] = {"none_properties": none_properties}
expect_dict["event_properties"] = {"none_properties": none_properties}
self.assertEqual(expect_dict, event.get_event_body())

def test_base_event_set_numeric_in_dict_attributes_success(self):
event = BaseEvent(event_type="test_event", user_id="test_user")
expect_dict = {"event_type": "test_event", "user_id": "test_user"}
Expand Down