Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello committed Dec 4, 2023
1 parent c2abb0d commit aa341f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions posthog/test/test_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def mock_post_fn(_, data, **kwargs):
res = mock.Mock()
res.status_code = 200
request_size = len(data.encode())
# Batches close after the first message bringing it bigger than BATCH_SIZE_LIMIT, let's add 5% of margin
self.assertTrue(request_size < (5 * 1024 * 1024) * 1.05, "batch size (%d) higher than limit" % request_size)
# Batches close after the first message bringing it bigger than BATCH_SIZE_LIMIT, let's add 10% of margin
self.assertTrue(request_size < (5 * 1024 * 1024) * 1.1, "batch size (%d) higher than limit" % request_size)
return res

with mock.patch("posthog.request._session.post", side_effect=mock_post_fn) as mock_post:
Expand Down

0 comments on commit aa341f2

Please sign in to comment.