Esempio n. 1
0
def test_handle_repodata_package_with_plugin(dao, local_channel,
                                             dummy_package_file, rules, config,
                                             db, plugin, user):
    pkg = Package(name="other-package", channel=local_channel)
    db.add(pkg)

    repodata = json.loads(repodata_json)
    package_name, package_data = list(repodata["packages"].items())[0]
    pkgstore = config.get_package_store()

    files_metadata = [(dummy_package_file, package_name, package_data)]

    handle_repodata_package(local_channel.name, files_metadata, dao, rules,
                            False, pkgstore, config)

    assert plugin.about['conda_version'] == '4.8.4'
Esempio n. 2
0
def test_handle_repodata_package(dao, user, local_channel, dummy_package_file,
                                 rules, config, db):
    pkg = Package(name="other-package", channel=local_channel)
    db.add(pkg)

    repodata = json.loads(repodata_json)
    package_name, package_data = list(repodata["packages"].items())[0]
    pkgstore = config.get_package_store()

    files_metadata = [(dummy_package_file, package_name, package_data)]

    handle_repodata_package(local_channel.name, files_metadata, dao, rules,
                            False, pkgstore, config)
    version = (db.query(PackageVersion).filter(
        PackageVersion.package_name == "other-package").one())

    assert version

    pkgstore.serve_path(local_channel.name, f"linux-64/{package_name}")