Skip to content
Merged
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 posthog/test/test_before_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
)


_CIRCULAR: dict = {}
_CIRCULAR["self"] = _CIRCULAR


class TestClient(unittest.TestCase):
@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -259,6 +263,10 @@ def test_before_send_callback_non_dict_output_drops_event(self):
"private-value",
["malformed", "valid"],
),
# A circular value fails cleaning, so its event is dropped before it is queued.
("circular_reference", "private-key", _CIRCULAR, ["valid"]),
Comment thread
eli-r-ph marked this conversation as resolved.
# A value that survives cleaning but not json costs only its queued event.
("unserializable_value", "private-key", complex(1, 2), ["valid"]),
]
)
def test_malformed_before_send_event_does_not_stop_consumer_or_shutdown(
Expand Down
Loading