def METHOD_NAME(publication_href):
    # Test that the .treeinfo file is available and AppStream sub-repo is published correctly
    distribution = rpm_distribution_factory(publication=publication_href)
    treeinfo_file = http_get(urljoin(distribution.base_url, ".treeinfo"))
    treeinfo = TreeInfo()
    with NamedTemporaryFile("wb") as temp_file:
        temp_file.write(treeinfo_file)
        temp_file.flush()
        treeinfo.load(f=temp_file.name)
    for variant_name, variant in treeinfo.variants.variants.items():
        if variant_name == "BaseOS":
            assert variant.paths.repository == "."
            assert variant.paths.packages == "Packages"
        elif variant_name == "AppStream":
            assert variant.paths.repository == "AppStream"
            assert variant.paths.packages == "AppStream/Packages"
            # Find the first package in the 'AppStream/Packages/a/' directory and download it
            parser = PackagesHtmlParser()
            a_packages_href = urljoin(
                distribution.base_url, "{}/a/".format(variant.paths.packages)
            )
            a_packages_listing = http_get(a_packages_href)
            parser.feed(a_packages_listing.__str__())
            full_package_path = urljoin(a_packages_href, parser.package_href)
            http_get(full_package_path)