@@ -274,14 +274,24 @@ def test_feature_enabled_request(self, patch_get):
274274 }]
275275 self .assertTrue (client .feature_enabled ('beta-feature' , 'distinct_id' ))
276276
277+ @mock .patch ('posthog.client.Poller' )
277278 @mock .patch ('posthog.client.get' )
278- def test_feature_enabled_doesnt_exist (self , patch_get ):
279+ def test_feature_enabled_doesnt_exist (self , patch_get , patch_poll ):
279280 client = Client (TEST_API_KEY , personal_api_key = 'test' )
280281 client .feature_flags = []
281282
282283 self .assertFalse (client .feature_enabled ('doesnt-exist' , 'distinct_id' ))
283284 self .assertTrue (client .feature_enabled ('doesnt-exist' , 'distinct_id' , True ))
284285
286+ @mock .patch ('posthog.client.Poller' )
287+ @mock .patch ('posthog.client.get' )
288+ def test_personal_api_key_doesnt_exist (self , patch_get , patch_poll ):
289+ client = Client (TEST_API_KEY )
290+ client .feature_flags = []
291+
292+ self .assertFalse (client .feature_enabled ('doesnt-exist' , 'distinct_id' ))
293+ self .assertTrue (client .feature_enabled ('doesnt-exist' , 'distinct_id' , True ))
294+
285295 @mock .patch ('posthog.client.Poller' )
286296 @mock .patch ('posthog.client.get' )
287297 def test_load_feature_flags_error (self , patch_get , patch_poll ):
0 commit comments