@@ -275,20 +275,33 @@ def data_source():
275
275
return model , model_repr
276
276
277
277
@pytest .fixture
278
- def healthcare_entity (data_source ):
278
+ def healthcare_entity_assertion ():
279
+ model = _models .HealthcareEntityAssertion (
280
+ conditionality = "conditionality" ,
281
+ certainty = "certainty" ,
282
+ association = "association" ,
283
+ )
284
+ model_repr = "HealthcareEntityAssertion(conditionality=conditionality, certainty=certainty, association=association)"
285
+
286
+ assert repr (model ) == model_repr
287
+ return model , model_repr
288
+
289
+ @pytest .fixture
290
+ def healthcare_entity (data_source , healthcare_entity_assertion ):
279
291
model = _models .HealthcareEntity (
280
292
text = "Bonjour" ,
281
293
normalized_text = "Bonjour" ,
282
294
category = "MyCategory" ,
283
295
subcategory = "MySubcategory" ,
296
+ assertion = healthcare_entity_assertion [0 ],
284
297
length = 7 ,
285
298
offset = 12 ,
286
299
confidence_score = 0.95 ,
287
300
data_sources = [data_source [0 ]],
288
301
)
289
302
model_repr = (
290
- "HealthcareEntity(text=Bonjour, normalized_text=Bonjour, category=MyCategory, subcategory=MySubcategory, length=7, offset=12, " +
291
- "confidence_score=0.95, data_sources=[{}])" .format (data_source [1 ])
303
+ "HealthcareEntity(text=Bonjour, normalized_text=Bonjour, category=MyCategory, subcategory=MySubcategory, assertion={}, length=7, offset=12, " \
304
+ "confidence_score=0.95, data_sources=[{}])" .format (healthcare_entity_assertion [ 1 ], data_source [1 ])
292
305
)
293
306
294
307
assert repr (model ) == model_repr
@@ -494,4 +507,4 @@ def test_analyze_healthcare_entities_result_item(
494
507
)
495
508
)
496
509
497
- assert repr (model ) == model_repr
510
+ assert repr (model ) == model_repr [: 1024 ]
0 commit comments