Пример #1
0
 def test_extract_unit_attributes(self, obj, expected):
     actual = conversion.extract_unit_attributes(obj)
     assert expected == actual
Пример #2
0
    def test_strip_unit_attributes(self, obj, expected):
        actual = conversion.strip_unit_attributes(obj)
        expected = {}

        assert (filter_none_values(
            conversion.extract_unit_attributes(actual)) == expected)
Пример #3
0
 def test_attach_unit_attributes(self, obj, units):
     actual = conversion.attach_unit_attributes(obj, units)
     assert units == filter_none_values(
         conversion.extract_unit_attributes(actual))