def METHOD_NAME(self):
    """
    Test if gecos fields are built correctly (removing trailing commas)
    """
    test_gecos = {
        "fullname": "Testing",
        "roomnumber": 1234,
        "workphone": 22222,
        "homephone": 99999,
    }
    expected_gecos_fields = "Testing,1234,22222,99999"
    self.assertEqual(useradd._build_gecos(test_gecos), expected_gecos_fields)
    test_gecos.pop("roomnumber")
    test_gecos.pop("workphone")
    expected_gecos_fields = "Testing,,,99999"
    self.assertEqual(useradd._build_gecos(test_gecos), expected_gecos_fields)
    test_gecos.pop("homephone")
    expected_gecos_fields = "Testing"
    self.assertEqual(useradd._build_gecos(test_gecos), expected_gecos_fields)