@@ -103,11 +103,11 @@ def test_basic_capture_exception(self):
103103 with mock .patch .object (Client , "capture" , return_value = None ) as patch_capture :
104104 client = self .client
105105 exception = Exception ("test exception" )
106- client .capture_exception (exception )
106+ client .capture_exception (exception , distinct_id = "distinct_id" )
107107
108108 self .assertTrue (patch_capture .called )
109109 capture_call = patch_capture .call_args [0 ]
110- self .assertEqual (capture_call [0 ], "python-exceptions " )
110+ self .assertEqual (capture_call [0 ], "distinct_id " )
111111 self .assertEqual (capture_call [1 ], "$exception" )
112112 self .assertEqual (
113113 capture_call [2 ],
@@ -122,7 +122,7 @@ def test_basic_capture_exception(self):
122122 "value" : "test exception" ,
123123 }
124124 ],
125- "$exception_personURL" : "https://us.i.posthog.com/project/random_key/person/python-exceptions " ,
125+ "$exception_personURL" : "https://us.i.posthog.com/project/random_key/person/distinct_id " ,
126126 },
127127 )
128128
@@ -213,11 +213,11 @@ def test_basic_capture_exception_with_no_exception_given(self):
213213 try :
214214 raise Exception ("test exception" )
215215 except Exception :
216- client .capture_exception ()
216+ client .capture_exception (distinct_id = "distinct_id" )
217217
218218 self .assertTrue (patch_capture .called )
219219 capture_call = patch_capture .call_args [0 ]
220- self .assertEqual (capture_call [0 ], "python-exceptions " )
220+ self .assertEqual (capture_call [0 ], "distinct_id " )
221221 self .assertEqual (capture_call [1 ], "$exception" )
222222 self .assertEqual (capture_call [2 ]["$exception_type" ], "Exception" )
223223 self .assertEqual (capture_call [2 ]["$exception_message" ], "test exception" )
0 commit comments