Skip to content

Commit 08c3f3b

Browse files
committed
test: Add coverage for deprecation warning
1 parent 71489a6 commit 08c3f3b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

posthog/test/test_client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ def test_requires_api_key(self):
4444

4545
def test_empty_flush(self):
4646
self.client.flush()
47-
47+
def test_get_feature_flag_payload_deprecation_warning(self):
48+
# This tells Python: "Expect a DeprecationWarning in the next line"
49+
with self.assertWarns(DeprecationWarning):
50+
self.client.get_feature_flag_payload("key", "distinct_id")
51+
4852
def test_basic_capture(self):
4953
with mock.patch("posthog.client.batch_post") as mock_post:
5054
client = Client(FAKE_TEST_API_KEY, on_error=self.set_fail, sync_mode=True)

0 commit comments

Comments
 (0)