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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joystein
Copy link

@joystein joystein commented Mar 1, 2023

Summary

Adds a test which have none as one of the values in the dict given to event_properties of a BaseEvent. This test fails, while I wouldn't necessarily expect that. Is this a bug?

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

@ethan-welysn
Copy link

I can confirm that attempting to create an event with event_properties= {"some_key": None} will result in an event with event_properties being equal to None. This feels like a bug to me.

event = BaseEvent(
    event_type="test_event", 
    user_id="test_user", 
    event_properties={'foo': 'bar', 'baz': None}
)
print(event.event_properties) ---> None
print(event.get_event_body()) ---> {'event_type': 'test_event'}

@sheepsy90
Copy link

I agree with that - it seems that canceling out all data in a event because one value is not set seems confusing - at best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants