def get_import_tests(pkginfo, import_tests_metada=""):
    """Return the section import in tests

    :param dict pkginfo: Package information
    :param dict import_tests_metada: Imports already present
    :return list: Sorted list with the libraries necessary for the test phase
    """
    if not pkginfo.get("packages"):
        return import_tests_metada

    olddeps = []
    if import_tests_metada != "PLACEHOLDER":
        olddeps = [
            x for x in import_tests_metada.split() if x != "-"
        ]
    return sorted(set(olddeps) | set(pkginfo["packages"]))