def METHOD_NAME():
    r = Route()
    c = r.codes.add()
    c.value = "foo"
    c.type = "source"
    c = r.codes.add()
    c.value = "bar"
    c.type = "extcode"
    assert RoutePoint._get_all_codes(r, "source") == ["foo"]
    assert RoutePoint._get_all_codes(r, "extcode") == ["bar"]
    # add a duplicate, this happens in real life...
    c = r.codes.add()
    c.value = "foo"
    c.type = "source"
    assert RoutePoint._get_all_codes(r, "source") == ["foo"]
    # source has two different values(think fusion)
    c = r.codes.add()
    c.value = "foo3"
    c.type = "source"
    assert set(RoutePoint._get_all_codes(r, "source")) == set(["foo", "foo3"])