MCPcopy
hub / github.com/PostHog/posthog / _create_event

Function _create_event

posthog/test/base.py:483–492  ·  view source on GitHub ↗

Create an event in tests. NOTE: all events get batched and only created when sync_execute is called

(**kwargs)

Source from the content-addressed store, hash-verified

481
482
483def _create_event(**kwargs):
484 """
485 Create an event in tests. NOTE: all events get batched and only created when sync_execute is called
486 """
487 if not kwargs.get("event_uuid"):
488 kwargs["event_uuid"] = str(uuid.uuid4())
489 if not kwargs.get("timestamp"):
490 kwargs["timestamp"] = now()
491 events_cache_tests.append(kwargs)
492 return kwargs["event_uuid"]
493
494
495def _create_person(*args, **kwargs):

Calls 2

nowFunction · 0.85
getMethod · 0.65

Used in the wild real call sites across dependent graphs

searching dependent graphs…