def versions(): dists = {} for dist in introspection.get_distributions().itervalues(): dists[dist.key] = DistributionInfo(project_name=dist.project_name, version=dist.version, relengapi_metadata={}) blueprints = {} relengapi_dist = pkg_resources.get_distribution('relengapi') for bp in app.relengapi_blueprints.itervalues(): blueprints[bp.name] = BlueprintInfo(distribution='relengapi', version=relengapi_dist.version) return VersionInfo(distributions=dists, blueprints=blueprints)
def versions(): dists = {} for dist in introspection.get_distributions().itervalues(): relengapi_metadata = dist.relengapi_metadata dists[dist.key] = DistributionInfo( project_name=dist.project_name, version=dist.version, relengapi_metadata=relengapi_metadata) blueprints = {} for bp in app.relengapi_blueprints.itervalues(): blueprints[bp.name] = BlueprintInfo(distribution=bp.dist.key, version=bp.dist.version) return VersionInfo(distributions=dists, blueprints=blueprints)
def versions(): dists = {} for dist in introspection.get_distributions().itervalues(): dists[dist.key] = DistributionInfo( project_name=dist.project_name, version=dist.version, relengapi_metadata={}) blueprints = {} relengapi_dist = pkg_resources.get_distribution('relengapi') for bp in app.relengapi_blueprints.itervalues(): blueprints[bp.name] = BlueprintInfo(distribution='relengapi', version=relengapi_dist.version) return VersionInfo(distributions=dists, blueprints=blueprints)
def versions(): dists = {} log = logger.bind(frobnication_id='12345', permissions=['frob', 'blob']) log.warning("frobnication failed") for dist in introspection.get_distributions().itervalues(): dists[dist.key] = DistributionInfo( project_name=dist.project_name, version=dist.version, relengapi_metadata={}) blueprints = {} relengapi_dist = pkg_resources.get_distribution('relengapi') for bp in app.relengapi_blueprints.itervalues(): blueprints[bp.name] = BlueprintInfo(distribution='relengapi', version=relengapi_dist.version) return VersionInfo(distributions=dists, blueprints=blueprints)
def test_get_distributions(): distributions = introspection.get_distributions() eq_(distributions['relengapi'].project_name, 'relengapi')
def test_metadata(): distributions = introspection.get_distributions() meta = distributions['relengapi'].relengapi_metadata assert 'repository_of_record' in meta