"""Unit tests for totals_attributs module.""" from unittest.mock import Mock from sosmodels import consts from sosmodels import totals_attributes def test_with_overall_totals(): """Test with_overall_totals decorator.""" my_cls = Mock() totals_attributes.with_overall_totals(my_cls) # check that all total metrics present in objects (writable) attributes assert ( len(set(my_cls.__dict__.keys()).intersection(set(consts.TOTAL_METRICS)) ) == len(consts.TOTAL_METRICS))