Exemplo n.º 1
0
def test_asset_group_from_package_name():
    from . import asset_package

    collection_1 = AssetGroup.from_package_name(asset_package.__name__)
    assert len(collection_1.assets) == 6

    assets_1 = [asset.op.name for asset in collection_1.assets]
    source_assets_1 = [source_asset.key for source_asset in collection_1.source_assets]

    collection_2 = AssetGroup.from_package_name(asset_package.__name__)
    assert len(collection_2.assets) == 6

    assets_2 = [asset.op.name for asset in collection_2.assets]
    source_assets_2 = [source_asset.key for source_asset in collection_2.source_assets]

    assert assets_1 == assets_2
    assert source_assets_1 == source_assets_2
Exemplo n.º 2
0
def test_asset_group_from_package_name():
    from . import asset_package

    collection = AssetGroup.from_package_name(asset_package.__name__)
    assert len(collection.assets) == 4
    assert {asset.op.name
            for asset in collection.assets} == {
                "little_richard",
                "miles_davis",
                "chuck_berry",
                "bb_king",
            }
    assert {source_asset.key
            for source_asset in collection.source_assets
            } == {AssetKey("elvis_presley")}