@@ -174,7 +174,7 @@ def test_lru_cache_works(self):
174174 )
175175 # Wait a bit for file upload to finish..
176176 time .sleep (0.5 )
177- assert record .attributes is not None
177+ self . assertIsNotNone ( record .attributes )
178178 self .assertTrue (
179179 self .hook ._file_exists (
180180 record .attributes ["gen_ai.system_instructions_ref" ]
@@ -213,7 +213,7 @@ def test_upload_when_inputs_outputs_empty(self):
213213 1 ,
214214 "should have uploaded 1 file" ,
215215 )
216- assert record .attributes is not None
216+ self . assertIsNotNone ( record .attributes )
217217 for ref_key in [
218218 "gen_ai.input.messages_ref" ,
219219 "gen_ai.output.messages_ref" ,
@@ -379,7 +379,7 @@ def test_system_insruction_is_hashed_to_avoid_reupload(self):
379379 with fsspec .open (expected_file_name , "wb" ) as file :
380380 file .write (b"asg" )
381381 # FIle should exist.
382- assert self .hook ._file_exists (expected_file_name ) is True
382+ self .assertTrue ( self . hook ._file_exists (expected_file_name ))
383383 system_instructions = [
384384 types .Text (content = "You are a helpful assistant." ),
385385 types .Text (content = "You will do your best." ),
@@ -392,7 +392,7 @@ def test_system_insruction_is_hashed_to_avoid_reupload(self):
392392 log_record = record ,
393393 )
394394 self .hook .shutdown ()
395- assert record .attributes is not None
395+ self . assertIsNotNone ( record .attributes )
396396
397397 self .assertEqual (
398398 record .attributes ["gen_ai.system_instructions_ref" ],
0 commit comments