def test_convert_weight(): weight = Weight(kg=1) expected_result = Weight(g=1000) assert convert_weight(weight, WeightUnits.GRAM) == expected_result