~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/testing/factory.py

[r=stevenk][bug=823644] Fix badge icon bug for person affiliation
 functionaility.

Show diffs side-by-side

added added

removed removed

Lines of Context:
954
954
        licenses=None, owner=None, registrant=None,
955
955
        title=None, summary=None, official_malone=None,
956
956
        translations_usage=None, bug_supervisor=None,
957
 
        driver=None, security_contact=None):
 
957
        driver=None, security_contact=None, icon=None):
958
958
        """Create and return a new, arbitrary Product."""
959
959
        if owner is None:
960
960
            owner = self.makePerson()
980
980
            self.getUniqueString('description'),
981
981
            licenses=licenses,
982
982
            project=project,
983
 
            registrant=registrant)
 
983
            registrant=registrant,
 
984
            icon=icon)
984
985
        naked_product = removeSecurityProxy(product)
985
986
        if official_malone is not None:
986
987
            naked_product.official_malone = official_malone
2332
2333
                         aliases=None, bug_supervisor=None, driver=None,
2333
2334
                         security_contact=None, publish_root_dir=None,
2334
2335
                         publish_base_url=None, publish_copy_base_url=None,
2335
 
                         no_pubconf=False):
 
2336
                         no_pubconf=False, icon=None):
2336
2337
        """Make a new distribution."""
2337
2338
        if name is None:
2338
2339
            name = self.getUniqueString(prefix="distribution")
2351
2352
            members = self.makeTeam(owner)
2352
2353
        distro = getUtility(IDistributionSet).new(
2353
2354
            name, displayname, title, description, summary, domainname,
2354
 
            members, owner, registrant)
 
2355
            members, owner, registrant, icon=icon)
2355
2356
        naked_distro = removeSecurityProxy(distro)
2356
2357
        if aliases is not None:
2357
2358
            naked_distro.setAliases(aliases)