@@ -961,22 +961,19 @@ def test_count(self):
961961 all_histories = [history1 , history2 , history3 , history4 ]
962962 deleted = [history1 , history2 , history3 ]
963963
964- self .log ("no filters should work" )
965- assert self .history_manager .count () == len (all_histories )
966- self .log ("orm filtered should work" )
964+ assert self .history_manager .count () == len (all_histories ), "having no filters should count all histories"
967965 filters = [model .History .deleted == true ()]
968- assert self .history_manager .count (filters = filters ) == len (deleted )
966+ assert self .history_manager .count (filters = filters ) == len (deleted ), "counting with orm filters should work"
969967
970968 raw_annotation_fn_filter = ("annotation" , "has" , test_annotation )
971- self . log ( "fn filtered is not supported" )
972- with pytest .raises (exceptions .RequestParameterInvalidException ) as exc :
969+ # functional filtering is not supported
970+ with pytest .raises (exceptions .RequestParameterInvalidException ) as exc_info :
973971 filters = self .filter_parser .parse_filters ([raw_annotation_fn_filter ])
974972 self .history_manager .count (filters = filters )
975- assert "not supported" in str (exc )
973+ assert "not supported" in str (exc_info )
976974
977975 raw_deleted_orm_filter = ("deleted" , "eq" , "True" )
978- self .log ("mixin orm and fn filtered is not supported" )
979- with pytest .raises (exceptions .RequestParameterInvalidException ) as exc :
976+ with pytest .raises (exceptions .RequestParameterInvalidException ) as exc_info :
980977 filters = self .filter_parser .parse_filters ([raw_deleted_orm_filter , raw_annotation_fn_filter ])
981978 self .history_manager .count (filters = filters )
982- assert "not supported" in str (exc )
979+ assert "not supported" in str (exc_info )
0 commit comments