def test_make_str_plural(self, context, expected): phrase = ( "$thing were names, towns, and telephone numbers of telephone subscribers" ) predicate = Predicate(content=phrase) with_context = predicate._content_with_terms(context) assert with_context.startswith(expected)
def test_predicate_with_entities(self): predicate = Predicate(content="$person1 and $person2 went up the hill") terms = [Entity(name="Jack"), Entity(name="Jill")] assert (predicate._content_with_terms(terms) == "<Jack> and <Jill> went up the hill")