Merge lp:~sinzui/launchpad/apocalypse-interface-imports-7 into lp:launchpad
- apocalypse-interface-imports-7
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Robert Collins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11767 |
Proposed branch: | lp:~sinzui/launchpad/apocalypse-interface-imports-7 |
Merge into: | lp:launchpad |
Diff against target: |
8038 lines (+1261/-882) 380 files modified
lib/canonical/database/ftests/test_multitablecopy.txt (+1/-1) lib/canonical/launchpad/browser/ftests/logintoken-corner-cases.txt (+3/-3) lib/canonical/launchpad/components/tests/decoratedresultset.txt (+1/-1) lib/canonical/launchpad/doc/account.txt (+5/-3) lib/canonical/launchpad/doc/announcement-date-widget.txt (+1/-1) lib/canonical/launchpad/doc/batch_navigation.txt (+1/-1) lib/canonical/launchpad/doc/canonical_url.txt (+1/-1) lib/canonical/launchpad/doc/canonical_url_examples.txt (+8/-5) lib/canonical/launchpad/doc/checkbox-matrix-widget.txt (+5/-2) lib/canonical/launchpad/doc/emailauthentication.txt (+1/-1) lib/canonical/launchpad/doc/feeds.txt (+1/-1) lib/canonical/launchpad/doc/gpg-encryption.txt (+1/-1) lib/canonical/launchpad/doc/gpghandler.txt (+4/-2) lib/canonical/launchpad/doc/hasowner-authorization.txt (+2/-2) lib/canonical/launchpad/doc/hierarchical-menu.txt (+3/-3) lib/canonical/launchpad/doc/launchpad-container.txt (+2/-2) lib/canonical/launchpad/doc/launchpad-target-widget.txt (+3/-3) lib/canonical/launchpad/doc/launchpadform.txt (+2/-2) lib/canonical/launchpad/doc/lazr-js-widgets.txt (+1/-1) lib/canonical/launchpad/doc/librarian.txt (+4/-4) lib/canonical/launchpad/doc/location-widget.txt (+1/-1) lib/canonical/launchpad/doc/logintoken-pages.txt (+1/-1) lib/canonical/launchpad/doc/logintoken.txt (+3/-3) lib/canonical/launchpad/doc/looptuner.txt (+1/-1) lib/canonical/launchpad/doc/lower-case-text-widget.txt (+2/-2) lib/canonical/launchpad/doc/menus.txt (+3/-3) lib/canonical/launchpad/doc/message.txt (+3/-2) lib/canonical/launchpad/doc/navigation.txt (+1/-1) lib/canonical/launchpad/doc/new-line-to-spaces-widget.txt (+1/-1) lib/canonical/launchpad/doc/notification-recipient-set.txt (+1/-1) lib/canonical/launchpad/doc/notification-text-escape.txt (+1/-1) lib/canonical/launchpad/doc/oauth.txt (+8/-3) lib/canonical/launchpad/doc/object-privacy.txt (+3/-2) lib/canonical/launchpad/doc/package-relationship.txt (+1/-1) lib/canonical/launchpad/doc/presenting-lengths-of-time.txt (+1/-1) lib/canonical/launchpad/doc/project-scope-widget.txt (+2/-2) lib/canonical/launchpad/doc/security-proxies.txt (+2/-2) lib/canonical/launchpad/doc/signedmessage.txt (+2/-2) lib/canonical/launchpad/doc/sqlobject-security-proxies.txt (+2/-2) lib/canonical/launchpad/doc/storm.txt (+11/-4) lib/canonical/launchpad/doc/stripped-text-widget.txt (+1/-1) lib/canonical/launchpad/doc/textsearching.txt (+2/-2) lib/canonical/launchpad/doc/timeout.txt (+3/-3) lib/canonical/launchpad/doc/tokens-text-widget.txt (+1/-1) lib/canonical/launchpad/doc/validation.txt (+7/-6) lib/canonical/launchpad/doc/vocabularies.txt (+6/-4) lib/canonical/launchpad/doc/webapp-authorization.txt (+2/-2) lib/canonical/launchpad/doc/webapp-publication.txt (+5/-5) lib/canonical/launchpad/doc/webservice-configuration.txt (+1/-1) lib/canonical/launchpad/doc/webservice-marshallers.txt (+6/-4) lib/canonical/launchpad/doc/xmlrpc-authserver.txt (+4/-2) lib/canonical/launchpad/interfaces/ftests/validation.txt (+5/-4) lib/canonical/launchpad/pagetests/feeds/xx-links.txt (+5/-2) lib/canonical/launchpad/pagetests/oauth/access-token.txt (+4/-3) lib/canonical/launchpad/pagetests/oauth/authorize-token.txt (+1/-1) lib/canonical/launchpad/pagetests/oauth/managing-tokens.txt (+3/-2) lib/canonical/launchpad/pagetests/standalone/xx-opstats.txt (+1/-1) lib/canonical/launchpad/pagetests/standalone/xx-request-expired.txt (+1/-1) lib/canonical/launchpad/pagetests/standalone/xx-soft-timeout.txt (+1/-1) lib/canonical/launchpad/pagetests/webservice/xx-service.txt (+1/-1) lib/canonical/launchpad/pagetests/webservice/xx-wadl.txt (+1/-1) lib/canonical/launchpad/webapp/ftests/test_adapter_timeout.txt.disabled (+2/-2) lib/canonical/launchpad/webapp/tests/test_preferredcharsets.txt (+1/-1) lib/canonical/launchpad/webapp/tests/test_request_expire_render.txt (+1/-1) lib/canonical/lazr/doc/menus.txt (+2/-2) lib/canonical/lazr/doc/timeout.txt (+1/-1) lib/lp/answers/browser/tests/views.txt (+2/-2) lib/lp/answers/doc/emailinterface.txt.disabled (+2/-2) lib/lp/answers/doc/expiration.txt (+2/-2) lib/lp/answers/doc/faq-vocabulary.txt (+2/-2) lib/lp/answers/doc/faq.txt (+2/-2) lib/lp/answers/doc/faqtarget.txt (+1/-1) lib/lp/answers/doc/notifications.txt (+2/-2) lib/lp/answers/doc/person.txt (+1/-1) lib/lp/answers/doc/projectgroup.txt (+1/-1) lib/lp/answers/doc/question.txt (+3/-3) lib/lp/answers/doc/questionsets.txt (+1/-1) lib/lp/answers/doc/questiontarget.txt (+1/-1) lib/lp/answers/doc/workflow.txt (+1/-1) lib/lp/answers/stories/distribution-package-answer-contact.txt (+2/-2) lib/lp/answers/tests/questiontarget-sourcepackage.txt (+1/-1) lib/lp/app/browser/tests/base-layout.txt (+1/-1) lib/lp/app/browser/tests/launchpadform-view.txt (+2/-2) lib/lp/app/doc/tales.txt (+3/-3) lib/lp/app/stories/basics/xx-beta-testers-redirection.txt (+2/-2) lib/lp/archivepublisher/tests/archive-signing.txt (+1/-1) lib/lp/archivepublisher/tests/publishing-meta-data-files.txt (+2/-2) lib/lp/archiveuploader/tests/nascentupload-announcements.txt (+5/-4) lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt (+3/-2) lib/lp/archiveuploader/tests/nascentupload-packageset.txt (+5/-4) lib/lp/archiveuploader/tests/nascentupload.txt (+5/-5) lib/lp/archiveuploader/tests/upload-karma.txt (+2/-2) lib/lp/archiveuploader/tests/uploadpolicy.txt (+2/-2) lib/lp/blueprints/doc/spec-mail-exploder.txt (+1/-1) lib/lp/blueprints/doc/specgraph.txt (+1/-1) lib/lp/blueprints/doc/specification-branch.txt (+1/-1) lib/lp/blueprints/doc/specification-notifications.txt (+1/-1) lib/lp/blueprints/doc/specification.txt (+2/-2) lib/lp/blueprints/doc/sprint-agenda.txt (+1/-1) lib/lp/blueprints/doc/sprint-meeting-export.txt (+2/-2) lib/lp/blueprints/doc/sprint.txt (+3/-3) lib/lp/blueprints/stories/sprints/20-sprint-registration.txt (+1/-1) lib/lp/bugs/browser/tests/bug-nomination-views.txt (+1/-1) lib/lp/bugs/browser/tests/bug-views.txt (+13/-4) lib/lp/bugs/browser/tests/buglinktarget-views.txt (+3/-2) lib/lp/bugs/browser/tests/bugs-views.txt (+2/-2) lib/lp/bugs/browser/tests/bugtask-adding-views.txt (+3/-3) lib/lp/bugs/browser/tests/bugtask-edit-views.txt (+3/-3) lib/lp/bugs/browser/tests/bugtask-search-views.txt (+3/-3) lib/lp/bugs/browser/tests/distrosourcepackage-bug-views.txt (+2/-2) lib/lp/bugs/browser/tests/person-bug-views.txt (+1/-1) lib/lp/bugs/doc/bug-change.txt (+1/-1) lib/lp/bugs/doc/bug-export.txt (+4/-3) lib/lp/bugs/doc/bug-nomination.txt (+1/-1) lib/lp/bugs/doc/bug-private-by-default.txt (+3/-2) lib/lp/bugs/doc/bug-reported-acknowledgement.txt (+3/-2) lib/lp/bugs/doc/bug-reporting-guidelines.txt (+3/-2) lib/lp/bugs/doc/bug-set-status.txt (+2/-2) lib/lp/bugs/doc/bug-tags.txt (+3/-3) lib/lp/bugs/doc/bug.txt (+1/-1) lib/lp/bugs/doc/bugactivity.txt (+8/-4) lib/lp/bugs/doc/bugattachments.txt (+9/-4) lib/lp/bugs/doc/bugcomment.txt (+1/-1) lib/lp/bugs/doc/bugmessage-visibility.txt (+1/-1) lib/lp/bugs/doc/bugnotification-email.txt (+12/-5) lib/lp/bugs/doc/bugnotification-sending.txt (+3/-3) lib/lp/bugs/doc/bugnotification-threading.txt (+1/-1) lib/lp/bugs/doc/bugnotificationrecipients.txt (+2/-2) lib/lp/bugs/doc/bugnotifications.txt (+11/-6) lib/lp/bugs/doc/bugsubscription.txt (+5/-3) lib/lp/bugs/doc/bugtarget.txt (+3/-2) lib/lp/bugs/doc/bugtask-bugwatch-widget.txt (+1/-1) lib/lp/bugs/doc/bugtask-expiration.txt (+7/-4) lib/lp/bugs/doc/bugtask-find-similar.txt (+4/-3) lib/lp/bugs/doc/bugtask-package-widget.txt (+1/-1) lib/lp/bugs/doc/bugtask-retrieval.txt (+4/-2) lib/lp/bugs/doc/bugtask-search.txt (+14/-7) lib/lp/bugs/doc/bugtask-status-workflow.txt (+3/-2) lib/lp/bugs/doc/bugtask.txt (+7/-5) lib/lp/bugs/doc/bugtracker.txt (+3/-3) lib/lp/bugs/doc/bugwatch.txt (+13/-8) lib/lp/bugs/doc/bugwidget.txt (+1/-1) lib/lp/bugs/doc/bugzilla-import.txt (+3/-2) lib/lp/bugs/doc/checkwatches-batching.txt (+1/-1) lib/lp/bugs/doc/checkwatches-cli-switches.txt (+1/-1) lib/lp/bugs/doc/checkwatches.txt (+6/-7) lib/lp/bugs/doc/displaying-bugs-and-tasks.txt (+6/-4) lib/lp/bugs/doc/externalbugtracker-bug-imports.txt (+3/-3) lib/lp/bugs/doc/externalbugtracker-bugzilla-api.txt (+1/-1) lib/lp/bugs/doc/externalbugtracker-bugzilla-lp-plugin.txt (+1/-1) lib/lp/bugs/doc/externalbugtracker-bugzilla-oddities.txt (+2/-2) lib/lp/bugs/doc/externalbugtracker-bugzilla.txt (+4/-3) lib/lp/bugs/doc/externalbugtracker-comment-imports.txt (+8/-5) lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt (+9/-7) lib/lp/bugs/doc/externalbugtracker-debbugs.txt (+7/-5) lib/lp/bugs/doc/externalbugtracker-emailaddress.txt (+5/-2) lib/lp/bugs/doc/externalbugtracker-mantis-csv.txt (+1/-1) lib/lp/bugs/doc/externalbugtracker-mantis.txt (+3/-3) lib/lp/bugs/doc/externalbugtracker-roundup.txt (+3/-3) lib/lp/bugs/doc/externalbugtracker-rt.txt (+6/-5) lib/lp/bugs/doc/externalbugtracker-sourceforge.txt (+3/-3) lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt (+5/-3) lib/lp/bugs/doc/externalbugtracker-trac.txt (+4/-4) lib/lp/bugs/doc/externalbugtracker.txt (+1/-1) lib/lp/bugs/doc/hasbugs.txt (+6/-3) lib/lp/bugs/doc/initial-bug-contacts.txt (+1/-1) lib/lp/bugs/doc/malone-karma.txt (+8/-4) lib/lp/bugs/doc/malone-xmlrpc.txt (+7/-5) lib/lp/bugs/doc/official-bug-tags.txt (+2/-2) lib/lp/bugs/doc/security-teams.txt (+4/-4) lib/lp/bugs/doc/sourceforge-remote-products.txt (+1/-1) lib/lp/bugs/stories/bug-privacy/40-unsubscribe-from-private-bug.txt (+4/-3) lib/lp/bugs/stories/bug-tags/xx-official-bug-tags.txt (+1/-1) lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt (+1/-1) lib/lp/bugs/stories/bugs/xx-bug-nomination-table-row.txt (+1/-1) lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt (+3/-2) lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt (+5/-2) lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt (+1/-1) lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt (+1/-1) lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt (+1/-1) lib/lp/bugs/stories/bugtask-management/xx-bug-importance-change.txt (+3/-2) lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt (+3/-2) lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt (+3/-2) lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt (+1/-1) lib/lp/bugs/stories/cve/cve-linking.txt (+1/-1) lib/lp/bugs/stories/feeds/xx-bug-atom.txt (+1/-1) lib/lp/bugs/stories/feeds/xx-bug-html.txt (+4/-2) lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt (+2/-2) lib/lp/bugs/stories/webservice/xx-bug.txt (+1/-1) lib/lp/bugs/tests/buglinktarget.txt (+5/-2) lib/lp/bugs/tests/bugs-emailinterface.txt (+6/-7) lib/lp/bugs/tests/bugtarget-questiontarget.txt (+5/-4) lib/lp/code/doc/branch-merge-proposal-notifications.txt (+1/-1) lib/lp/code/doc/branch-visibility.txt (+1/-1) lib/lp/code/doc/codeimport-event.txt (+1/-1) lib/lp/code/doc/codeimport-job.txt (+1/-1) lib/lp/code/doc/codeimport.txt (+2/-2) lib/lp/code/stories/branches/xx-branch-deletion.txt (+1/-1) lib/lp/code/stories/branches/xx-branch-index.txt (+2/-2) lib/lp/code/stories/branches/xx-branchmergeproposal-listings.txt (+1/-1) lib/lp/code/stories/branches/xx-branchmergeproposals.txt (+2/-2) lib/lp/code/stories/branches/xx-creating-branches.txt (+2/-2) lib/lp/code/stories/branches/xx-private-branch-listings.txt (+1/-1) lib/lp/code/stories/codeimport/xx-failing-codeimport.txt (+1/-1) lib/lp/code/stories/feeds/xx-revision-atom.txt (+1/-1) lib/lp/code/stories/webservice/xx-branch.txt (+1/-1) lib/lp/coop/answersbugs/stories/question-buglink.txt (+1/-1) lib/lp/coop/answersbugs/tests/notifications-linked-bug.txt (+2/-2) lib/lp/hardwaredb/doc/hwdb-device-tables.txt (+4/-2) lib/lp/hardwaredb/doc/hwdb-submission.txt (+1/-1) lib/lp/hardwaredb/doc/hwdb.txt (+8/-6) lib/lp/registry/browser/tests/coc-views.txt (+1/-1) lib/lp/registry/browser/tests/milestone-views.txt (+2/-2) lib/lp/registry/browser/tests/peoplemerge-views.txt (+1/-1) lib/lp/registry/browser/tests/person-admin-views.txt (+1/-1) lib/lp/registry/browser/tests/person-views.txt (+2/-4) lib/lp/registry/browser/tests/pillar-views.txt (+2/-2) lib/lp/registry/browser/tests/poll-views_0.txt (+2/-2) lib/lp/registry/browser/tests/private-team-creation-views.txt (+4/-2) lib/lp/registry/browser/tests/product-portlet-packages-view.txt (+5/-3) lib/lp/registry/browser/tests/product-views.txt (+2/-2) lib/lp/registry/browser/tests/team-views.txt (+2/-2) lib/lp/registry/doc/announcement.txt (+4/-2) lib/lp/registry/doc/commercialsubscription.txt (+2/-2) lib/lp/registry/doc/distribution-mirror.txt (+13/-5) lib/lp/registry/doc/distribution-sourcepackage.txt (+3/-3) lib/lp/registry/doc/distribution.txt (+3/-6) lib/lp/registry/doc/distroseries.txt (+11/-10) lib/lp/registry/doc/entitlement.txt (+10/-5) lib/lp/registry/doc/featuredproject.txt (+4/-3) lib/lp/registry/doc/gpg-signatures.txt (+1/-1) lib/lp/registry/doc/gpgkey.txt (+5/-2) lib/lp/registry/doc/irc.txt (+1/-1) lib/lp/registry/doc/jabber.txt (+1/-1) lib/lp/registry/doc/karmacache.txt (+3/-3) lib/lp/registry/doc/karmacontext.txt (+4/-2) lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt (+2/-2) lib/lp/registry/doc/mailinglists.txt (+5/-3) lib/lp/registry/doc/mentoringoffer.txt (+8/-5) lib/lp/registry/doc/message-holds.txt (+1/-1) lib/lp/registry/doc/milestone.txt (+6/-5) lib/lp/registry/doc/person-account.txt (+3/-3) lib/lp/registry/doc/person-karma.txt (+5/-3) lib/lp/registry/doc/person-notification.txt (+1/-1) lib/lp/registry/doc/person.txt (+15/-10) lib/lp/registry/doc/personlocation.txt (+2/-2) lib/lp/registry/doc/pillar-aliases-field.txt (+1/-1) lib/lp/registry/doc/pillar.txt (+6/-5) lib/lp/registry/doc/poll-preconditions.txt (+1/-1) lib/lp/registry/doc/poll.txt (+6/-2) lib/lp/registry/doc/product-widgets.txt (+2/-2) lib/lp/registry/doc/product.txt (+5/-2) lib/lp/registry/doc/productrelease-file-download.txt (+3/-3) lib/lp/registry/doc/productseries.txt (+7/-4) lib/lp/registry/doc/projectgroup.txt (+4/-2) lib/lp/registry/doc/sshkey.txt (+5/-2) lib/lp/registry/doc/standing.txt (+6/-4) lib/lp/registry/doc/structural-subscriptions.txt (+5/-5) lib/lp/registry/doc/team-nav-menus.txt (+3/-3) lib/lp/registry/doc/teammembership-email-notification.txt (+8/-4) lib/lp/registry/doc/teammembership.txt (+5/-3) lib/lp/registry/doc/user-to-user.txt (+1/-1) lib/lp/registry/doc/wikiname.txt (+1/-1) lib/lp/registry/stories/announcements/xx-announcements.txt (+4/-2) lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt (+2/-2) lib/lp/registry/stories/gpg-coc/01-claimgpg.txt (+2/-2) lib/lp/registry/stories/gpg-coc/04-reactivategpg.txt (+1/-1) lib/lp/registry/stories/gpg-coc/11-handle-special-keys.txt (+1/-1) lib/lp/registry/stories/mailinglists/lifecycle.txt (+1/-1) lib/lp/registry/stories/mailinglists/subscriptions.txt (+2/-2) lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt (+3/-3) lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt (+2/-2) lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt (+1/-1) lib/lp/registry/stories/team/xx-adminteammerge.txt (+1/-1) lib/lp/registry/stories/team/xx-team-membership.txt (+2/-2) lib/lp/registry/stories/teammembership/10-join-team.txt (+1/-1) lib/lp/registry/stories/teammembership/xx-expire-subscription.txt (+1/-1) lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt (+5/-2) lib/lp/registry/stories/vouchers/xx-voucher-redemption.txt (+1/-1) lib/lp/registry/stories/webservice/xx-distribution-mirror.txt (+1/-1) lib/lp/registry/stories/webservice/xx-distribution.txt (+1/-1) lib/lp/registry/stories/webservice/xx-person.txt (+1/-1) lib/lp/registry/stories/webservice/xx-private-team.txt (+1/-1) lib/lp/registry/tests/structural-subscription-target.txt (+1/-2) lib/lp/services/fields/doc/uri-field.txt (+2/-2) lib/lp/services/inlinehelp/README.txt (+3/-3) lib/lp/services/mail/tests/incomingmail.txt (+2/-2) lib/lp/services/mailman/doc/batching.txt (+1/-1) lib/lp/services/mailman/doc/bounces.txt (+1/-1) lib/lp/services/mailman/doc/postings.txt (+2/-2) lib/lp/services/mailman/doc/recovery.txt (+4/-2) lib/lp/services/mailman/doc/staging.txt (+1/-1) lib/lp/services/mailman/doc/subscriptions.txt (+2/-2) lib/lp/services/memcache/doc/tales-cache.txt (+2/-2) lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt (+2/-2) lib/lp/soyuz/browser/tests/build-views.txt (+1/-1) lib/lp/soyuz/browser/tests/builder-views.txt (+2/-2) lib/lp/soyuz/browser/tests/distroseriesqueue-views.txt (+2/-2) lib/lp/soyuz/browser/tests/sourcepackage-views.txt (+1/-1) lib/lp/soyuz/doc/archive-files.txt (+1/-1) lib/lp/soyuz/doc/archivepermission.txt (+3/-2) lib/lp/soyuz/doc/binarypackagebuild.txt (+3/-3) lib/lp/soyuz/doc/binarypackagerelease.txt (+7/-6) lib/lp/soyuz/doc/buildd-dispatching.txt (+1/-1) lib/lp/soyuz/doc/buildd-scoring.txt (+2/-3) lib/lp/soyuz/doc/buildd-slavescanner.txt (+2/-2) lib/lp/soyuz/doc/closing-bugs-from-changelogs.txt (+2/-2) lib/lp/soyuz/doc/components-and-sections.txt (+3/-3) lib/lp/soyuz/doc/distribution.txt (+2/-2) lib/lp/soyuz/doc/distroarchseries.txt (+5/-6) lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt (+5/-6) lib/lp/soyuz/doc/distroseries-publishing-lookups.txt (+2/-2) lib/lp/soyuz/doc/distroseriesqueue-dist-upgrader.txt (+1/-1) lib/lp/soyuz/doc/distroseriesqueue-notify.txt (+1/-1) lib/lp/soyuz/doc/distroseriesqueue-translations.txt (+2/-2) lib/lp/soyuz/doc/distroseriesqueue.txt (+8/-9) lib/lp/soyuz/doc/fakepackager.txt (+2/-2) lib/lp/soyuz/doc/gina-multiple-arch.txt (+1/-1) lib/lp/soyuz/doc/manage-chroot.txt (+1/-1) lib/lp/soyuz/doc/package-diff.txt (+5/-5) lib/lp/soyuz/doc/package-meta-classes.txt (+2/-3) lib/lp/soyuz/doc/packagecopyrequest.txt (+3/-3) lib/lp/soyuz/doc/pocketchroot.txt (+1/-1) lib/lp/soyuz/doc/publishing.txt (+16/-12) lib/lp/soyuz/doc/queuebuilder.txt (+1/-1) lib/lp/soyuz/doc/sourcepackagerelease-build-lookup.txt (+2/-2) lib/lp/soyuz/doc/sourcepackagerelease.txt (+6/-5) lib/lp/soyuz/doc/soyuz-files.txt (+7/-4) lib/lp/soyuz/doc/soyuz-set-of-uploads.txt (+6/-4) lib/lp/soyuz/doc/soyuz-upload.txt (+11/-5) lib/lp/soyuz/stories/ppa/xx-copy-packages.txt (+2/-2) lib/lp/soyuz/stories/ppa/xx-delete-packages.txt (+3/-2) lib/lp/soyuz/stories/ppa/xx-ppa-files.txt (+1/-1) lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt (+1/-2) lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt (+1/-1) lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt (+2/-2) lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt (+1/-2) lib/lp/soyuz/stories/soyuz/xx-package-diff.txt (+4/-4) lib/lp/soyuz/stories/soyuz/xx-person-packages.txt (+2/-2) lib/lp/soyuz/stories/soyuz/xx-private-builds.txt (+2/-2) lib/lp/soyuz/stories/soyuz/xx-queue-pages-delayed-copies.txt (+1/-1) lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt (+3/-2) lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt (+4/-4) lib/lp/soyuz/stories/webservice/xx-archive.txt (+1/-1) lib/lp/soyuz/stories/webservice/xx-archivedependency.txt (+1/-1) lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt (+1/-1) lib/lp/soyuz/stories/webservice/xx-builds.txt (+3/-3) lib/lp/soyuz/stories/webservice/xx-packageupload.txt (+2/-2) lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt (+5/-5) lib/lp/translations/browser/tests/pofile-base-views.txt (+1/-1) lib/lp/translations/browser/tests/pofile-views.txt (+3/-3) lib/lp/translations/browser/tests/potemplate-views.txt (+2/-2) lib/lp/translations/browser/tests/translationimportqueue-views.txt (+1/-1) lib/lp/translations/browser/tests/translationmessage-views.txt (+3/-3) lib/lp/translations/doc/language-pack.txt (+1/-1) lib/lp/translations/doc/poexport-language-pack.txt (+3/-3) lib/lp/translations/doc/poexport-request-productseries.txt (+1/-1) lib/lp/translations/doc/pofile.txt (+3/-3) lib/lp/translations/doc/poimport.txt (+1/-1) lib/lp/translations/doc/potemplate.txt (+1/-1) lib/lp/translations/doc/potmsgset.txt (+3/-3) lib/lp/translations/doc/rosetta-karma.txt (+1/-1) lib/lp/translations/doc/translationimportqueue.txt (+1/-1) lib/lp/translations/doc/translationmessage-destroy.txt (+1/-1) lib/lp/translations/doc/translationmessage.txt (+1/-1) lib/lp/translations/doc/translations-export-to-branch.txt (+1/-1) lib/lp/translations/doc/translationsoverview.txt (+2/-2) lib/lp/translations/doc/translationtemplatesbuildbehavior.txt (+1/-1) lib/lp/translations/stories/buildfarm/xx-build-summary.txt (+1/-1) lib/lp/translations/stories/productseries/xx-productseries-translations.txt (+1/-1) lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt (+1/-1) lib/lp/translations/stories/standalone/xx-potemplate-edit.txt (+1/-1) lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt (+2/-2) lib/lp/translations/stories/standalone/xx-translation-access-display.txt (+1/-1) lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt (+1/-1) lib/lp/translations/stories/translationgroups/30-show-group-translation-targets.txt (+2/-2) lib/lp/translations/stories/translationgroups/60-translation-suggestions.txt (+2/-2) lib/lp/translations/tests/potmsgset-update-translation.txt (+1/-1) utilities/migrater/deglob.py (+161/-2) utilities/migrater/find.py (+30/-28) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/apocalypse-interface-imports-7 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Robert Collins (community) | Approve | ||
Review via email: mp+38727@code.launchpad.net |
Commit message
Description of the change
This is my branch to fix the remaining glob imports in doctests.
lp:~sinzui/launchpad/apocalypse-interface-imports-7
Diff size: 2979
Launchpad bug: https:/
Test command: The whole test suite.
Pre-
Target release: 10.11
Fix the remaining glob imports in doctests
-------
Do not import from canonical.
Rules
-----
* Update the deglobber to expand multi-line import to single line imports
* Then run the deglob doctest rules.
* Send to ec2 to verify the tests run.
QA
--
None.
Lint
----
Lint hates these files. There are lots of long lines, moin headers, and
indentation issues. I am not inclined to fix these at this time since I
believe many of these tests should be unittests instead.
Test
----
All test changes were made via the script--no direct edits were made.
Implementation
--------------
* Modified the deglobber helper. This is really a script that will always
require hacks to help fix the imports from c.l.i.
Aaron Bentley (abentley) wrote : | # |
Robert Collins (lifeless) wrote : | # |
Edwin has a script that can fix that, perhaps run it afterwards?
Curtis Hovey (sinzui) wrote : | # |
I sorted the imports in all the doctests. This is a much larger change because doctests never enforced alphabetical order. I reduced the size of the change by ensuring zope imports are listed first, as we do in modules.
I have verified all the tests run and pass.
Robert Collins (lifeless) wrote : | # |
Thanks curtis.
Aaron Bentley (abentley) : | # |
Preview Diff
1 | === modified file 'lib/canonical/database/ftests/test_multitablecopy.txt' |
2 | --- lib/canonical/database/ftests/test_multitablecopy.txt 2008-05-19 15:24:34 +0000 |
3 | +++ lib/canonical/database/ftests/test_multitablecopy.txt 2010-10-20 01:49:43 +0000 |
4 | @@ -5,8 +5,8 @@ |
5 | |
6 | >>> import transaction |
7 | >>> from canonical.database import postgresql |
8 | + >>> from canonical.database.multitablecopy import MultiTableCopy |
9 | >>> from canonical.database.sqlbase import cursor |
10 | - >>> from canonical.database.multitablecopy import MultiTableCopy |
11 | |
12 | >>> # Keep track of tables we'll want to clean up later |
13 | >>> tables_to_clean_up = [] |
14 | |
15 | === modified file 'lib/canonical/launchpad/browser/ftests/logintoken-corner-cases.txt' |
16 | --- lib/canonical/launchpad/browser/ftests/logintoken-corner-cases.txt 2010-10-03 15:30:06 +0000 |
17 | +++ lib/canonical/launchpad/browser/ftests/logintoken-corner-cases.txt 2010-10-20 01:49:43 +0000 |
18 | @@ -11,11 +11,11 @@ |
19 | redirect to the default token view. This would happen if for example the |
20 | user tried to re-post the form after validating one of their email addresses. |
21 | |
22 | - >>> from lp.registry.interfaces.person import IPersonSet |
23 | - >>> from canonical.launchpad.interfaces import ( |
24 | - ... ILoginTokenSet, LoginTokenType) |
25 | >>> from canonical.launchpad.browser import ValidateEmailView |
26 | + >>> from canonical.launchpad.interfaces.authtoken import LoginTokenType |
27 | + >>> from canonical.launchpad.interfaces.logintoken import ILoginTokenSet |
28 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
29 | + >>> from lp.registry.interfaces.person import IPersonSet |
30 | |
31 | >>> foo_bar = getUtility(IPersonSet).getByName('name16') |
32 | >>> token = getUtility(ILoginTokenSet).new( |
33 | |
34 | === modified file 'lib/canonical/launchpad/components/tests/decoratedresultset.txt' |
35 | --- lib/canonical/launchpad/components/tests/decoratedresultset.txt 2010-10-09 16:36:22 +0000 |
36 | +++ lib/canonical/launchpad/components/tests/decoratedresultset.txt 2010-10-20 01:49:43 +0000 |
37 | @@ -10,8 +10,8 @@ |
38 | ResultSet: |
39 | |
40 | >>> from zope.component import getUtility |
41 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
42 | >>> from storm.store import Store |
43 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
44 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
45 | >>> store = Store.of(ubuntu) |
46 | >>> from lp.registry.model.distribution import Distribution |
47 | |
48 | === modified file 'lib/canonical/launchpad/doc/account.txt' |
49 | --- lib/canonical/launchpad/doc/account.txt 2010-10-10 15:39:28 +0000 |
50 | +++ lib/canonical/launchpad/doc/account.txt 2010-10-20 01:49:43 +0000 |
51 | @@ -126,8 +126,10 @@ |
52 | If we add a new guessed email address, it will be included in the |
53 | guessed list. |
54 | |
55 | - >>> from canonical.launchpad.interfaces import ( |
56 | - ... EmailAddressStatus, IEmailAddressSet) |
57 | + >>> from canonical.launchpad.interfaces.emailaddress import ( |
58 | + ... EmailAddressStatus, |
59 | + ... IEmailAddressSet, |
60 | + ... ) |
61 | >>> email = getUtility(IEmailAddressSet).new( |
62 | ... "guessed-email@example.com", account=account, |
63 | ... status=EmailAddressStatus.NEW) |
64 | @@ -294,8 +296,8 @@ |
65 | |
66 | # We need to change database policy here again, as the SSO Server cannot |
67 | # modify tables in the lpmain replication set. |
68 | + >>> from canonical.launchpad.webapp.dbpolicy import MasterDatabasePolicy |
69 | >>> from canonical.launchpad.webapp.interfaces import IStoreSelector |
70 | - >>> from canonical.launchpad.webapp.dbpolicy import MasterDatabasePolicy |
71 | >>> getUtility(IStoreSelector).push(MasterDatabasePolicy()) |
72 | |
73 | >>> from lp.registry.interfaces.person import PersonCreationRationale |
74 | |
75 | === modified file 'lib/canonical/launchpad/doc/announcement-date-widget.txt' |
76 | --- lib/canonical/launchpad/doc/announcement-date-widget.txt 2009-08-13 19:36:01 +0000 |
77 | +++ lib/canonical/launchpad/doc/announcement-date-widget.txt 2010-10-20 01:49:43 +0000 |
78 | @@ -4,10 +4,10 @@ |
79 | choose to publish an announcement immediately, at a predetermined date in the |
80 | future, or to manually publish it later. |
81 | |
82 | + >>> from zope.schema import Field |
83 | >>> from canonical.launchpad.testing.pages import extract_text |
84 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
85 | >>> from canonical.widgets.announcementdate import AnnouncementDateWidget |
86 | - >>> from zope.schema import Field |
87 | >>> field = Field(__name__='foo', title=u'Foo') |
88 | >>> widget = AnnouncementDateWidget(field, LaunchpadTestRequest()) |
89 | >>> print extract_text(widget()) |
90 | |
91 | === modified file 'lib/canonical/launchpad/doc/batch_navigation.txt' |
92 | --- lib/canonical/launchpad/doc/batch_navigation.txt 2010-10-09 16:36:22 +0000 |
93 | +++ lib/canonical/launchpad/doc/batch_navigation.txt 2010-10-20 01:49:43 +0000 |
94 | @@ -55,8 +55,8 @@ |
95 | |
96 | Imports and initialization: |
97 | |
98 | + >>> from canonical.ftests.pgsql import CursorWrapper |
99 | >>> from canonical.launchpad.database import EmailAddress |
100 | - >>> from canonical.ftests.pgsql import CursorWrapper |
101 | >>> from canonical.launchpad.interfaces.lpstorm import IStore |
102 | >>> ignore = IStore(EmailAddress) # Prime the database connection. |
103 | ... # (Priming is important if this test is run in isolation). |
104 | |
105 | === modified file 'lib/canonical/launchpad/doc/canonical_url.txt' |
106 | --- lib/canonical/launchpad/doc/canonical_url.txt 2010-10-09 16:36:22 +0000 |
107 | +++ lib/canonical/launchpad/doc/canonical_url.txt 2010-10-20 01:49:43 +0000 |
108 | @@ -502,8 +502,8 @@ |
109 | |
110 | >>> from zope.app.security.principalregistry import ( |
111 | ... UnauthenticatedPrincipal) |
112 | + >>> from canonical.launchpad.webapp.interaction import setupInteraction |
113 | >>> from canonical.launchpad.webapp.servers import WebServiceTestRequest |
114 | - >>> from canonical.launchpad.webapp.interaction import setupInteraction |
115 | >>> from lazr.restful.utils import get_current_browser_request |
116 | >>> anonymous = UnauthenticatedPrincipal(None, None, None) |
117 | >>> api_request = WebServiceTestRequest() |
118 | |
119 | === modified file 'lib/canonical/launchpad/doc/canonical_url_examples.txt' |
120 | --- lib/canonical/launchpad/doc/canonical_url_examples.txt 2010-10-11 16:17:45 +0000 |
121 | +++ lib/canonical/launchpad/doc/canonical_url_examples.txt 2010-10-20 01:49:43 +0000 |
122 | @@ -52,8 +52,11 @@ |
123 | |
124 | == Persons and Teams == |
125 | |
126 | - >>> from canonical.launchpad.interfaces import ( |
127 | - ... IPersonSet, ICodeOfConductSet, ISignedCodeOfConductSet) |
128 | + >>> from lp.registry.interfaces.codeofconduct import ( |
129 | + ... ICodeOfConductSet, |
130 | + ... ISignedCodeOfConductSet, |
131 | + ... ) |
132 | + >>> from lp.registry.interfaces.person import IPersonSet |
133 | |
134 | The IPersonSet. |
135 | |
136 | @@ -133,8 +136,8 @@ |
137 | |
138 | == Projects groups and products == |
139 | |
140 | - >>> from canonical.launchpad.interfaces import ( |
141 | - ... IProjectGroupSet, IProductSet) |
142 | + >>> from lp.registry.interfaces.product import IProductSet |
143 | + >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet |
144 | |
145 | The IProjectGroupSet. |
146 | |
147 | @@ -289,8 +292,8 @@ |
148 | |
149 | == Remote Bug Trackers and Remote Bugs == |
150 | |
151 | + >>> from lp.bugs.browser.bugtracker import RemoteBug |
152 | >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
153 | - >>> from lp.bugs.browser.bugtracker import RemoteBug |
154 | |
155 | An IBugTrackerSet. |
156 | |
157 | |
158 | === modified file 'lib/canonical/launchpad/doc/checkbox-matrix-widget.txt' |
159 | --- lib/canonical/launchpad/doc/checkbox-matrix-widget.txt 2010-10-03 15:30:06 +0000 |
160 | +++ lib/canonical/launchpad/doc/checkbox-matrix-widget.txt 2010-10-20 01:49:43 +0000 |
161 | @@ -10,8 +10,11 @@ |
162 | |
163 | >>> from BeautifulSoup import BeautifulSoup |
164 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
165 | - >>> from canonical.launchpad.interfaces import ( |
166 | - ... IProduct, IProductSet, License) |
167 | + >>> from lp.registry.interfaces.product import ( |
168 | + ... IProduct, |
169 | + ... IProductSet, |
170 | + ... License, |
171 | + ... ) |
172 | >>> product = getUtility(IProductSet).get(1) |
173 | >>> licenses_field = IProduct['licenses'].bind(product) |
174 | >>> vtype = licenses_field.value_type |
175 | |
176 | === modified file 'lib/canonical/launchpad/doc/emailauthentication.txt' |
177 | --- lib/canonical/launchpad/doc/emailauthentication.txt 2010-10-15 15:20:39 +0000 |
178 | +++ lib/canonical/launchpad/doc/emailauthentication.txt 2010-10-20 01:49:43 +0000 |
179 | @@ -37,9 +37,9 @@ |
180 | user in the launch bag: |
181 | |
182 | >>> import email |
183 | + >>> from zope.component import getUtility |
184 | >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
185 | >>> from lp.registry.interfaces.person import IPersonSet |
186 | - >>> from zope.component import getUtility |
187 | >>> launchbag = getUtility(ILaunchBag) |
188 | >>> name, addr = email.Utils.parseaddr(msg['From']) |
189 | >>> from_user = getUtility(IPersonSet).getByEmail(addr) |
190 | |
191 | === modified file 'lib/canonical/launchpad/doc/feeds.txt' |
192 | --- lib/canonical/launchpad/doc/feeds.txt 2009-08-05 18:52:52 +0000 |
193 | +++ lib/canonical/launchpad/doc/feeds.txt 2010-10-20 01:49:43 +0000 |
194 | @@ -108,8 +108,8 @@ |
195 | by browsers and the reverse-proxy in front of the feeds servers. |
196 | |
197 | >>> from canonical.config import config |
198 | + >>> from canonical.lazr.feed.feed import FeedBase |
199 | >>> from lp.bugs.feed.bug import BugsFeedBase |
200 | - >>> from canonical.lazr.feed.feed import FeedBase |
201 | >>> config.launchpad.max_feed_cache_minutes |
202 | 60 |
203 | >>> config.launchpad.max_bug_feed_cache_minutes |
204 | |
205 | === modified file 'lib/canonical/launchpad/doc/gpg-encryption.txt' |
206 | --- lib/canonical/launchpad/doc/gpg-encryption.txt 2010-10-09 16:36:22 +0000 |
207 | +++ lib/canonical/launchpad/doc/gpg-encryption.txt 2010-10-20 01:49:43 +0000 |
208 | @@ -15,8 +15,8 @@ |
209 | |
210 | Sample Person has public and secret keys set. |
211 | |
212 | + >>> from zope.component import getUtility |
213 | >>> from canonical.launchpad.ftests import login |
214 | - >>> from zope.component import getUtility |
215 | >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
216 | |
217 | >>> bag = getUtility(ILaunchBag) |
218 | |
219 | === modified file 'lib/canonical/launchpad/doc/gpghandler.txt' |
220 | --- lib/canonical/launchpad/doc/gpghandler.txt 2010-10-03 15:30:06 +0000 |
221 | +++ lib/canonical/launchpad/doc/gpghandler.txt 2010-10-20 01:49:43 +0000 |
222 | @@ -25,8 +25,10 @@ |
223 | >>> from zope.component import getUtility |
224 | >>> from canonical.launchpad.webapp.testing import verifyObject |
225 | |
226 | - >>> from canonical.launchpad.interfaces import ( |
227 | - ... IGPGHandler, IPymeKey) |
228 | + >>> from canonical.launchpad.interfaces.gpghandler import ( |
229 | + ... IGPGHandler, |
230 | + ... IPymeKey, |
231 | + ... ) |
232 | >>> gpghandler = getUtility(IGPGHandler) |
233 | |
234 | ------------------------------------------------------------------------- |
235 | |
236 | === modified file 'lib/canonical/launchpad/doc/hasowner-authorization.txt' |
237 | --- lib/canonical/launchpad/doc/hasowner-authorization.txt 2010-01-12 14:52:41 +0000 |
238 | +++ lib/canonical/launchpad/doc/hasowner-authorization.txt 2010-10-20 01:49:43 +0000 |
239 | @@ -5,8 +5,8 @@ |
240 | |
241 | # First we define a class which only provides IHasOwner. |
242 | >>> from zope.interface import implements |
243 | + >>> from lp.registry.interfaces.person import IPersonSet |
244 | >>> from lp.registry.interfaces.role import IHasOwner |
245 | - >>> from lp.registry.interfaces.person import IPersonSet |
246 | >>> salgado = getUtility(IPersonSet).getByName('salgado') |
247 | >>> class FooObject: |
248 | ... implements(IHasOwner) |
249 | @@ -15,8 +15,8 @@ |
250 | Salgado is the owner of any FooObject we create, so he can edit it. |
251 | |
252 | >>> foo = FooObject() |
253 | + >>> from zope.component import queryAdapter |
254 | >>> from canonical.launchpad.webapp.interfaces import IAuthorization |
255 | - >>> from zope.component import queryAdapter |
256 | >>> authorization = queryAdapter(foo, IAuthorization, 'launchpad.Edit') |
257 | >>> print authorization.checkAccountAuthenticated(salgado.account) |
258 | True |
259 | |
260 | === modified file 'lib/canonical/launchpad/doc/hierarchical-menu.txt' |
261 | --- lib/canonical/launchpad/doc/hierarchical-menu.txt 2010-07-27 12:42:00 +0000 |
262 | +++ lib/canonical/launchpad/doc/hierarchical-menu.txt 2010-10-20 01:49:43 +0000 |
263 | @@ -22,8 +22,8 @@ |
264 | >>> class ICooker(Interface): |
265 | ... """A cooker.""" |
266 | |
267 | + >>> from canonical.launchpad.webapp.interfaces import ICanonicalUrlData |
268 | >>> from canonical.launchpad.webapp.url import urlappend |
269 | - >>> from canonical.launchpad.webapp.interfaces import ICanonicalUrlData |
270 | |
271 | >>> class BaseContent: |
272 | ... implements(ICanonicalUrlData) |
273 | @@ -83,8 +83,8 @@ |
274 | IBreadcrumb adapters are registered for them. The hierarchy builds a list of |
275 | breadcrumbs starting with the breadcrumb closest to the hierarchy root. |
276 | |
277 | + >>> from canonical.launchpad.browser.launchpad import Hierarchy |
278 | >>> from canonical.launchpad.webapp.breadcrumb import Breadcrumb |
279 | - >>> from canonical.launchpad.browser.launchpad import Hierarchy |
280 | |
281 | # Monkey patch Hierarchy.makeBreadcrumbForRequestedPage so that we don't |
282 | # have to create fake views and other stuff to test breadcrumbs here. The |
283 | @@ -174,8 +174,8 @@ |
284 | context. The default adapter provides the url attribute, but the breadcrumb's |
285 | text must be overriden in subclasses. |
286 | |
287 | - >>> from canonical.launchpad.webapp.interfaces import IBreadcrumb |
288 | >>> from zope.interface.verify import verifyObject |
289 | + >>> from canonical.launchpad.webapp.interfaces import IBreadcrumb |
290 | >>> breadcrumb = Breadcrumb(cookbook) |
291 | >>> verifyObject(IBreadcrumb, breadcrumb) |
292 | True |
293 | |
294 | === modified file 'lib/canonical/launchpad/doc/launchpad-container.txt' |
295 | --- lib/canonical/launchpad/doc/launchpad-container.txt 2009-06-12 16:36:02 +0000 |
296 | +++ lib/canonical/launchpad/doc/launchpad-container.txt 2010-10-20 01:49:43 +0000 |
297 | @@ -7,8 +7,8 @@ |
298 | that we have an easy way of finding whether or not any given object is |
299 | within the scope of a token's context and grant or deny access to it. |
300 | |
301 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchpadContainer |
302 | >>> from canonical.launchpad.webapp.testing import verifyObject |
303 | - >>> from canonical.launchpad.webapp.interfaces import ILaunchpadContainer |
304 | >>> from lp.registry.interfaces.product import IProductSet |
305 | >>> from lp.registry.interfaces.distribution import ( |
306 | ... IDistributionSet) |
307 | @@ -80,8 +80,8 @@ |
308 | Bugs are associated to our pillars through their bug tasks, so a bug is |
309 | said to be within any of its bugtasks' targets. |
310 | |
311 | + >>> from lp.bugs.interfaces.bug import IBugSet |
312 | >>> from operator import attrgetter |
313 | - >>> from lp.bugs.interfaces.bug import IBugSet |
314 | >>> bug_1 = getUtility(IBugSet).get(1) |
315 | >>> bugtasks = bug_1.bugtasks |
316 | >>> targets = [task.target for task in bug_1.bugtasks] |
317 | |
318 | === modified file 'lib/canonical/launchpad/doc/launchpad-target-widget.txt' |
319 | --- lib/canonical/launchpad/doc/launchpad-target-widget.txt 2010-10-09 16:36:22 +0000 |
320 | +++ lib/canonical/launchpad/doc/launchpad-target-widget.txt 2010-10-20 01:49:43 +0000 |
321 | @@ -3,10 +3,10 @@ |
322 | The general +filebug allows bugs to be filed on any product or package, |
323 | and to help with this, the LaunchpadTargetWidget is used. |
324 | |
325 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
326 | >>> from canonical.launchpad.webapp.testing import verifyObject |
327 | + >>> from canonical.widgets.launchpadtarget import LaunchpadTargetWidget |
328 | >>> from lp.bugs.interfaces.bug import IFrontPageBugAddForm |
329 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
330 | - >>> from canonical.widgets.launchpadtarget import LaunchpadTargetWidget |
331 | |
332 | >>> empty_request = LaunchpadTestRequest() |
333 | >>> widget = LaunchpadTargetWidget( |
334 | @@ -14,8 +14,8 @@ |
335 | |
336 | The widget complies to both IInputWidget and IBrowserWidget. |
337 | |
338 | + >>> from zope.app.form.browser.interfaces import IBrowserWidget |
339 | >>> from zope.app.form.interfaces import IInputWidget |
340 | - >>> from zope.app.form.browser.interfaces import IBrowserWidget |
341 | >>> verifyObject(IInputWidget, widget) |
342 | True |
343 | >>> verifyObject(IBrowserWidget, widget) |
344 | |
345 | === modified file 'lib/canonical/launchpad/doc/launchpadform.txt' |
346 | --- lib/canonical/launchpad/doc/launchpadform.txt 2009-06-12 16:36:02 +0000 |
347 | +++ lib/canonical/launchpad/doc/launchpadform.txt 2010-10-20 01:49:43 +0000 |
348 | @@ -131,8 +131,8 @@ |
349 | attribute: |
350 | |
351 | >>> from zope.app.form.browser import TextWidget |
352 | + >>> from canonical.launchpad.webapp import custom_widget |
353 | >>> from canonical.widgets import PasswordChangeWidget |
354 | - >>> from canonical.launchpad.webapp import custom_widget |
355 | |
356 | >>> class FormTestView3(LaunchpadFormView): |
357 | ... schema = IFormTest |
358 | @@ -469,9 +469,9 @@ |
359 | First we'll create a fake pagetemplate which doesn't use Launchpad's main |
360 | template and thus is way simpler. |
361 | |
362 | - >>> from z3c.ptcompat import ViewPageTemplateFile |
363 | >>> from StringIO import StringIO |
364 | >>> from tempfile import mkstemp |
365 | + >>> from z3c.ptcompat import ViewPageTemplateFile |
366 | >>> file, filename = mkstemp() |
367 | >>> f = open(filename, 'w') |
368 | >>> f.write(u'<div metal:use-macro="context/@@launchpad_form/form" />') |
369 | |
370 | === modified file 'lib/canonical/launchpad/doc/lazr-js-widgets.txt' |
371 | --- lib/canonical/launchpad/doc/lazr-js-widgets.txt 2010-10-09 16:36:22 +0000 |
372 | +++ lib/canonical/launchpad/doc/lazr-js-widgets.txt 2010-10-20 01:49:43 +0000 |
373 | @@ -82,8 +82,8 @@ |
374 | The InlineEditPickerWidget can be used for any interface attribute that |
375 | has a vocabulary defined for it. |
376 | |
377 | + >>> from zope.component import getUtility |
378 | >>> from canonical.widgets.lazrjs import InlineEditPickerWidget |
379 | - >>> from zope.component import getUtility |
380 | >>> from lp.bugs.interfaces.bugtask import IBugTask, IBugTaskSet |
381 | >>> bugtask = getUtility(IBugTaskSet).get(2) |
382 | >>> def create_inline_edit_picker_widget(): |
383 | |
384 | === modified file 'lib/canonical/launchpad/doc/librarian.txt' |
385 | --- lib/canonical/launchpad/doc/librarian.txt 2010-10-10 15:39:28 +0000 |
386 | +++ lib/canonical/launchpad/doc/librarian.txt 2010-10-20 01:49:43 +0000 |
387 | @@ -28,8 +28,8 @@ |
388 | |
389 | == High Level == |
390 | |
391 | + >>> from StringIO import StringIO |
392 | >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
393 | - >>> from StringIO import StringIO |
394 | >>> data = 'This is some data' |
395 | |
396 | We can create LibraryFileAliases using the ILibraryFileAliasSet utility. |
397 | @@ -118,8 +118,8 @@ |
398 | However, we can force the use of HTTP by setting the 'HTTP_X_SCHEME' |
399 | header in the request to 'http', even when 'use_https' is True. |
400 | |
401 | + >>> from zope.component import getMultiAdapter |
402 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
403 | - >>> from zope.component import getMultiAdapter |
404 | >>> from urlparse import urlparse |
405 | >>> request = LaunchpadTestRequest( |
406 | ... environ={'REQUEST_METHOD': 'GET', |
407 | @@ -573,9 +573,9 @@ |
408 | |
409 | XXX bug=631884 we have to establish the flags object manually for testing. |
410 | |
411 | + >>> from lp.services.features import per_thread |
412 | + >>> from lp.services.features.flags import FeatureController |
413 | >>> from lp.services.features.webapp import ScopesFromRequest |
414 | - >>> from lp.services.features.flags import FeatureController |
415 | - >>> from lp.services.features import per_thread |
416 | >>> per_thread.features = FeatureController( |
417 | ... ScopesFromRequest(empty_request).lookup) |
418 | |
419 | |
420 | === modified file 'lib/canonical/launchpad/doc/location-widget.txt' |
421 | --- lib/canonical/launchpad/doc/location-widget.txt 2010-09-21 04:21:16 +0000 |
422 | +++ lib/canonical/launchpad/doc/location-widget.txt 2010-10-20 01:49:43 +0000 |
423 | @@ -3,9 +3,9 @@ |
424 | A widget used when setting the geographic location of a given person. |
425 | |
426 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
427 | + >>> from canonical.widgets.location import LocationWidget |
428 | >>> from lp.registry.interfaces.person import IPersonSet |
429 | >>> from lp.services.fields import LocationField |
430 | - >>> from canonical.widgets.location import LocationWidget |
431 | >>> salgado = getUtility(IPersonSet).getByName('salgado') |
432 | >>> field = LocationField(__name__='location', title=u'Location') |
433 | |
434 | |
435 | === modified file 'lib/canonical/launchpad/doc/logintoken-pages.txt' |
436 | --- lib/canonical/launchpad/doc/logintoken-pages.txt 2010-10-03 15:30:06 +0000 |
437 | +++ lib/canonical/launchpad/doc/logintoken-pages.txt 2010-10-20 01:49:43 +0000 |
438 | @@ -21,8 +21,8 @@ |
439 | >>> from canonical.launchpad.interfaces.authtoken import LoginTokenType |
440 | >>> from canonical.launchpad.interfaces.logintoken import ( |
441 | ... ILoginTokenSet) |
442 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
443 | >>> from lp.registry.model.person import PersonSet |
444 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
445 | |
446 | # To simplify our tests we'll use the PersonSet() class directly instead |
447 | # of gettint it as a zope secured utility. If we don't do that we'd have |
448 | |
449 | === modified file 'lib/canonical/launchpad/doc/logintoken.txt' |
450 | --- lib/canonical/launchpad/doc/logintoken.txt 2009-05-12 01:39:29 +0000 |
451 | +++ lib/canonical/launchpad/doc/logintoken.txt 2010-10-20 01:49:43 +0000 |
452 | @@ -18,12 +18,12 @@ |
453 | 4) The token is now marked as consumed, together with any other |
454 | tokens of the same type and for the same email address. |
455 | |
456 | + >>> from canonical.launchpad.interfaces.authtoken import LoginTokenType |
457 | >>> from lp.registry.model.person import Person |
458 | - >>> from canonical.launchpad.interfaces.authtoken import LoginTokenType |
459 | >>> from canonical.launchpad.interfaces.logintoken import ( |
460 | ... ILoginTokenSet) |
461 | + >>> from canonical.database.sqlbase import flush_database_updates |
462 | >>> from lp.services.mail import stub |
463 | - >>> from canonical.database.sqlbase import flush_database_updates |
464 | >>> import transaction |
465 | >>> foobar = Person.byName('name16') |
466 | |
467 | @@ -96,8 +96,8 @@ |
468 | our own making. |
469 | |
470 | >>> import pytz |
471 | + >>> from zope.security.proxy import removeSecurityProxy |
472 | >>> from datetime import datetime |
473 | - >>> from zope.security.proxy import removeSecurityProxy |
474 | |
475 | >>> token = removeSecurityProxy(token) |
476 | >>> token.date_consumed = datetime( |
477 | |
478 | === modified file 'lib/canonical/launchpad/doc/looptuner.txt' |
479 | --- lib/canonical/launchpad/doc/looptuner.txt 2010-04-07 15:57:55 +0000 |
480 | +++ lib/canonical/launchpad/doc/looptuner.txt 2010-10-20 01:49:43 +0000 |
481 | @@ -20,8 +20,8 @@ |
482 | |
483 | >>> import math |
484 | >>> from zope.interface import implements |
485 | + >>> from canonical.launchpad.interfaces.looptuner import ITunableLoop |
486 | >>> from canonical.launchpad.utilities.looptuner import LoopTuner |
487 | - >>> from canonical.launchpad.interfaces.looptuner import ITunableLoop |
488 | |
489 | The LoopTuner requires the operation you define for it to implement the |
490 | ITunableLoop interface. |
491 | |
492 | === modified file 'lib/canonical/launchpad/doc/lower-case-text-widget.txt' |
493 | --- lib/canonical/launchpad/doc/lower-case-text-widget.txt 2010-10-09 16:36:22 +0000 |
494 | +++ lib/canonical/launchpad/doc/lower-case-text-widget.txt 2010-10-20 01:49:43 +0000 |
495 | @@ -7,9 +7,9 @@ |
496 | LowerCaseTextWidget can be used to automatically convert the input to |
497 | lower case: |
498 | |
499 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
500 | + >>> from canonical.widgets.textwidgets import LowerCaseTextWidget |
501 | >>> from lp.bugs.interfaces.bug import IBug |
502 | - >>> from canonical.widgets.textwidgets import LowerCaseTextWidget |
503 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
504 | >>> field = IBug['description'] |
505 | >>> request = LaunchpadTestRequest(form={'field.description':'Foo'}) |
506 | >>> widget = LowerCaseTextWidget(field, request) |
507 | |
508 | === modified file 'lib/canonical/launchpad/doc/menus.txt' |
509 | --- lib/canonical/launchpad/doc/menus.txt 2009-10-21 17:41:20 +0000 |
510 | +++ lib/canonical/launchpad/doc/menus.txt 2010-10-20 01:49:43 +0000 |
511 | @@ -341,8 +341,8 @@ |
512 | # We need to use a real launchpad test request so the view adapter |
513 | # lookups will work. That request also needs to implement |
514 | # IParticipation so that the login machinery will work. |
515 | + >>> from zope.security.interfaces import IParticipation |
516 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
517 | - >>> from zope.security.interfaces import IParticipation |
518 | >>> class InteractiveTestRequest(LaunchpadTestRequest): |
519 | ... implements(IParticipation) |
520 | ... principal = None |
521 | @@ -687,10 +687,10 @@ |
522 | link should appear linked. The request is also set as the menu's |
523 | 'request' attribute. |
524 | |
525 | + >>> from zope.publisher.interfaces.browser import IBrowserRequest |
526 | + >>> from zope.publisher.interfaces.http import IHTTPApplicationRequest |
527 | >>> from canonical.launchpad.ftests import test_tales |
528 | >>> from canonical.launchpad.webapp import LaunchpadView |
529 | - >>> from zope.publisher.interfaces.http import IHTTPApplicationRequest |
530 | - >>> from zope.publisher.interfaces.browser import IBrowserRequest |
531 | >>> from canonical.launchpad.webapp.vhosts import allvhosts |
532 | >>> class FakeRequest: |
533 | ... implements(IHTTPApplicationRequest, IBrowserRequest) |
534 | |
535 | === modified file 'lib/canonical/launchpad/doc/message.txt' |
536 | --- lib/canonical/launchpad/doc/message.txt 2010-10-09 16:36:22 +0000 |
537 | +++ lib/canonical/launchpad/doc/message.txt 2010-10-20 01:49:43 +0000 |
538 | @@ -4,8 +4,9 @@ |
539 | various parts of launchpad. Currently, it is used by Malone for comments |
540 | on bugs. Bugs are linked to Messages via the BugMessage table. |
541 | |
542 | - >>> from canonical.launchpad.interfaces import ( |
543 | - ... IBugMessageSet, IBugSet, IOpenLaunchBag) |
544 | + >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag |
545 | + >>> from lp.bugs.interfaces.bug import IBugSet |
546 | + >>> from lp.bugs.interfaces.bugmessage import IBugMessageSet |
547 | >>> login('foo.bar@canonical.com') |
548 | >>> bugmessageset = getUtility(IBugMessageSet) |
549 | >>> bug_one = getUtility(IBugSet).get(1) |
550 | |
551 | === modified file 'lib/canonical/launchpad/doc/navigation.txt' |
552 | --- lib/canonical/launchpad/doc/navigation.txt 2010-10-03 15:30:06 +0000 |
553 | +++ lib/canonical/launchpad/doc/navigation.txt 2010-10-20 01:49:43 +0000 |
554 | @@ -269,8 +269,8 @@ |
555 | Once registered, we can look the navigation up using getMultiAdapter(). |
556 | |
557 | >>> from zope.component import getMultiAdapter |
558 | + >>> from zope.publisher.interfaces.browser import IBrowserPublisher |
559 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
560 | - >>> from zope.publisher.interfaces.browser import IBrowserPublisher |
561 | >>> navigation = getMultiAdapter( |
562 | ... (thingset, LaunchpadTestRequest()), IBrowserPublisher, name='') |
563 | |
564 | |
565 | === modified file 'lib/canonical/launchpad/doc/new-line-to-spaces-widget.txt' |
566 | --- lib/canonical/launchpad/doc/new-line-to-spaces-widget.txt 2010-10-09 16:36:22 +0000 |
567 | +++ lib/canonical/launchpad/doc/new-line-to-spaces-widget.txt 2010-10-20 01:49:43 +0000 |
568 | @@ -3,8 +3,8 @@ |
569 | |
570 | This custom widget is used to replace new line characters to spaces. |
571 | |
572 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
573 | >>> from canonical.widgets.bugtask import NewLineToSpacesWidget |
574 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
575 | >>> from lp.bugs.interfaces.bugtask import IBugTaskSearch |
576 | |
577 | We pass a string with some new line characters to the widget |
578 | |
579 | === modified file 'lib/canonical/launchpad/doc/notification-recipient-set.txt' |
580 | --- lib/canonical/launchpad/doc/notification-recipient-set.txt 2010-10-09 16:36:22 +0000 |
581 | +++ lib/canonical/launchpad/doc/notification-recipient-set.txt 2010-10-20 01:49:43 +0000 |
582 | @@ -15,8 +15,8 @@ |
583 | You can use it as is or derive from it |
584 | (see bugnotificationrecipients.txt for an example of a derivation). |
585 | |
586 | + >>> from canonical.launchpad.interfaces.launchpad import INotificationRecipientSet |
587 | >>> from canonical.launchpad.webapp.testing import verifyObject |
588 | - >>> from canonical.launchpad.interfaces.launchpad import INotificationRecipientSet |
589 | >>> from canonical.launchpad.mailnotification import ( |
590 | ... NotificationRecipientSet) |
591 | |
592 | |
593 | === modified file 'lib/canonical/launchpad/doc/notification-text-escape.txt' |
594 | --- lib/canonical/launchpad/doc/notification-text-escape.txt 2008-04-16 16:28:14 +0000 |
595 | +++ lib/canonical/launchpad/doc/notification-text-escape.txt 2010-10-20 01:49:43 +0000 |
596 | @@ -41,8 +41,8 @@ |
597 | IStructuredString interface, then a string will be returned with the |
598 | appropriate sections escaped and unescaped. |
599 | |
600 | + >>> from canonical.launchpad.webapp.interfaces import IStructuredString |
601 | >>> from canonical.launchpad.webapp.menu import structured |
602 | - >>> from canonical.launchpad.webapp.interfaces import IStructuredString |
603 | >>> msg = u'<b>%(escaped)s</b>' |
604 | >>> structured_text = structured(msg, escaped=u'<br/>foo') |
605 | >>> IStructuredString.providedBy(structured_text) |
606 | |
607 | === modified file 'lib/canonical/launchpad/doc/oauth.txt' |
608 | --- lib/canonical/launchpad/doc/oauth.txt 2010-10-18 10:11:04 +0000 |
609 | +++ lib/canonical/launchpad/doc/oauth.txt 2010-10-20 01:49:43 +0000 |
610 | @@ -13,9 +13,14 @@ |
611 | >>> from canonical.launchpad.webapp.testing import verifyObject |
612 | >>> from canonical.launchpad.webapp.interfaces import ( |
613 | ... AccessLevel, OAuthPermission) |
614 | - >>> from canonical.launchpad.interfaces import ( |
615 | - ... IOAuthAccessToken, IOAuthConsumer, IOAuthConsumerSet, |
616 | - ... IOAuthNonce, IOAuthRequestToken, IPersonSet) |
617 | + >>> from canonical.launchpad.interfaces.oauth import ( |
618 | + ... IOAuthAccessToken, |
619 | + ... IOAuthConsumer, |
620 | + ... IOAuthConsumerSet, |
621 | + ... IOAuthNonce, |
622 | + ... IOAuthRequestToken, |
623 | + ... ) |
624 | + >>> from lp.registry.interfaces.person import IPersonSet |
625 | >>> consumer_set = getUtility(IOAuthConsumerSet) |
626 | >>> verifyObject(IOAuthConsumerSet, consumer_set) |
627 | True |
628 | |
629 | === modified file 'lib/canonical/launchpad/doc/object-privacy.txt' |
630 | --- lib/canonical/launchpad/doc/object-privacy.txt 2010-10-03 15:30:06 +0000 |
631 | +++ lib/canonical/launchpad/doc/object-privacy.txt 2010-10-20 01:49:43 +0000 |
632 | @@ -8,8 +8,9 @@ |
633 | IObjectPrivacy and check its is_private attribute. |
634 | |
635 | >>> from canonical.lazr.interfaces import IObjectPrivacy |
636 | - >>> from canonical.launchpad.interfaces import ( |
637 | - ... IBugSet, IPersonSet, IQuestionSet) |
638 | + >>> from lp.answers.interfaces.questioncollection import IQuestionSet |
639 | + >>> from lp.bugs.interfaces.bug import IBugSet |
640 | + >>> from lp.registry.interfaces.person import IPersonSet |
641 | >>> bug = getUtility(IBugSet).get(1) |
642 | >>> bug.private |
643 | False |
644 | |
645 | === modified file 'lib/canonical/launchpad/doc/package-relationship.txt' |
646 | --- lib/canonical/launchpad/doc/package-relationship.txt 2010-10-09 16:36:22 +0000 |
647 | +++ lib/canonical/launchpad/doc/package-relationship.txt 2010-10-20 01:49:43 +0000 |
648 | @@ -54,8 +54,8 @@ |
649 | Now for each parsed element we can build an IPackageRelationship: |
650 | |
651 | >>> from canonical.launchpad.browser import PackageRelationship |
652 | + >>> from canonical.launchpad.interfaces.packagerelationship import IPackageRelationship |
653 | >>> from canonical.launchpad.webapp.testing import verifyObject |
654 | - >>> from canonical.launchpad.interfaces.packagerelationship import IPackageRelationship |
655 | |
656 | >>> name, version, operator = parsed_relationships[1] |
657 | >>> fake_url = 'http://host/path' |
658 | |
659 | === modified file 'lib/canonical/launchpad/doc/presenting-lengths-of-time.txt' |
660 | --- lib/canonical/launchpad/doc/presenting-lengths-of-time.txt 2005-10-31 18:29:12 +0000 |
661 | +++ lib/canonical/launchpad/doc/presenting-lengths-of-time.txt 2010-10-20 01:49:43 +0000 |
662 | @@ -3,8 +3,8 @@ |
663 | |
664 | First, let's bring in some dependencies: |
665 | |
666 | + >>> from canonical.launchpad.ftests import test_tales |
667 | >>> from datetime import timedelta |
668 | - >>> from canonical.launchpad.ftests import test_tales |
669 | |
670 | Exact Duration |
671 | -------------- |
672 | |
673 | === modified file 'lib/canonical/launchpad/doc/project-scope-widget.txt' |
674 | --- lib/canonical/launchpad/doc/project-scope-widget.txt 2010-10-09 16:36:22 +0000 |
675 | +++ lib/canonical/launchpad/doc/project-scope-widget.txt 2010-10-20 01:49:43 +0000 |
676 | @@ -7,9 +7,9 @@ |
677 | we will use the Project vocabulary which allows any project to be |
678 | selected. |
679 | |
680 | - >>> from canonical.launchpad.webapp.testing import verifyObject |
681 | >>> from zope.schema import Choice |
682 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
683 | + >>> from canonical.launchpad.webapp.testing import verifyObject |
684 | >>> from canonical.widgets.project import ProjectScopeWidget |
685 | |
686 | >>> empty_request = LaunchpadTestRequest() |
687 | @@ -21,8 +21,8 @@ |
688 | |
689 | The widget complies to both IInputWidget and IBrowserWidget. |
690 | |
691 | + >>> from zope.app.form.browser.interfaces import IBrowserWidget |
692 | >>> from zope.app.form.interfaces import IInputWidget |
693 | - >>> from zope.app.form.browser.interfaces import IBrowserWidget |
694 | >>> verifyObject(IInputWidget, widget) |
695 | True |
696 | >>> verifyObject(IBrowserWidget, widget) |
697 | |
698 | === modified file 'lib/canonical/launchpad/doc/security-proxies.txt' |
699 | --- lib/canonical/launchpad/doc/security-proxies.txt 2010-10-17 02:00:18 +0000 |
700 | +++ lib/canonical/launchpad/doc/security-proxies.txt 2010-10-20 01:49:43 +0000 |
701 | @@ -45,8 +45,8 @@ |
702 | XXX: bug 3315 |
703 | DB schema objects should be comparable correctly when proxied... |
704 | |
705 | - >>> from canonical.launchpad.interfaces import ( |
706 | - ... SeriesStatus, IDistroSeriesSet) |
707 | + >>> from lp.registry.interfaces.distroseries import IDistroSeriesSet |
708 | + >>> from lp.registry.interfaces.series import SeriesStatus |
709 | >>> hoary = getUtility(IDistroSeriesSet).get(3) |
710 | >>> print hoary.status.name |
711 | DEVELOPMENT |
712 | |
713 | === modified file 'lib/canonical/launchpad/doc/signedmessage.txt' |
714 | --- lib/canonical/launchpad/doc/signedmessage.txt 2007-08-09 14:49:07 +0000 |
715 | +++ lib/canonical/launchpad/doc/signedmessage.txt 2010-10-20 01:49:43 +0000 |
716 | @@ -6,9 +6,9 @@ |
717 | SignedMessage as the _class parameter, but it also ensures that all |
718 | the attributes are correctly set. |
719 | |
720 | + >>> from canonical.launchpad.interfaces.mail import ISignedMessage |
721 | + >>> from canonical.launchpad.mail import signed_message_from_string |
722 | >>> from canonical.launchpad.webapp.testing import verifyObject |
723 | - >>> from canonical.launchpad.mail import signed_message_from_string |
724 | - >>> from canonical.launchpad.interfaces.mail import ISignedMessage |
725 | >>> msg = signed_message_from_string('To: someone\n\nHello.') |
726 | >>> verifyObject(ISignedMessage, msg) |
727 | True |
728 | |
729 | === modified file 'lib/canonical/launchpad/doc/sqlobject-security-proxies.txt' |
730 | --- lib/canonical/launchpad/doc/sqlobject-security-proxies.txt 2010-10-03 15:30:06 +0000 |
731 | +++ lib/canonical/launchpad/doc/sqlobject-security-proxies.txt 2010-10-20 01:49:43 +0000 |
732 | @@ -3,9 +3,9 @@ |
733 | |
734 | Do some imports. |
735 | |
736 | + >>> from zope.component import getUtility |
737 | + >>> from lp.bugs.model.bug import BugTask |
738 | >>> from lp.registry.interfaces.person import IPersonSet |
739 | - >>> from lp.bugs.model.bug import BugTask |
740 | - >>> from zope.component import getUtility |
741 | |
742 | Login as Mark. |
743 | |
744 | |
745 | === modified file 'lib/canonical/launchpad/doc/storm.txt' |
746 | --- lib/canonical/launchpad/doc/storm.txt 2010-10-03 15:30:06 +0000 |
747 | +++ lib/canonical/launchpad/doc/storm.txt 2010-10-20 01:49:43 +0000 |
748 | @@ -6,14 +6,21 @@ |
749 | In addition to what Storm provides, we also have some Launchpad |
750 | specific Storm tools to cope with our master and slave store arrangement. |
751 | |
752 | - >>> from canonical.launchpad.interfaces import ( |
753 | - ... EmailAddressStatus, IEmailAddressSet, |
754 | - ... IMasterObject, IMasterStore, ISlaveStore, IStore) |
755 | + >>> from canonical.launchpad.interfaces.emailaddress import ( |
756 | + ... EmailAddressStatus, |
757 | + ... IEmailAddressSet, |
758 | + ... ) |
759 | + >>> from canonical.launchpad.interfaces.lpstorm import ( |
760 | + ... IMasterObject, |
761 | + ... IMasterStore, |
762 | + ... ISlaveStore, |
763 | + ... IStore, |
764 | + ... ) |
765 | >>> from canonical.launchpad.database import ( |
766 | ... Account, AccountPassword, EmailAddress) |
767 | + >>> from zope.security.proxy import ProxyFactory |
768 | >>> from lp.registry.interfaces.person import IPersonSet |
769 | >>> from lp.registry.model.person import Person |
770 | - >>> from zope.security.proxy import ProxyFactory |
771 | |
772 | |
773 | You need to use the correct master Store to make changes to |
774 | |
775 | === modified file 'lib/canonical/launchpad/doc/stripped-text-widget.txt' |
776 | --- lib/canonical/launchpad/doc/stripped-text-widget.txt 2010-10-09 16:36:22 +0000 |
777 | +++ lib/canonical/launchpad/doc/stripped-text-widget.txt 2010-10-20 01:49:43 +0000 |
778 | @@ -30,8 +30,8 @@ |
779 | |
780 | This custom widget is used to strip leading and trailing whitespaces. |
781 | |
782 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
783 | >>> from canonical.widgets.textwidgets import StrippedTextWidget |
784 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
785 | >>> from lp.bugs.interfaces.bugtracker import IRemoteBug |
786 | |
787 | We pass a string with leading and trailing whitespaces to the widget |
788 | |
789 | === modified file 'lib/canonical/launchpad/doc/textsearching.txt' |
790 | --- lib/canonical/launchpad/doc/textsearching.txt 2010-10-09 16:36:22 +0000 |
791 | +++ lib/canonical/launchpad/doc/textsearching.txt 2010-10-20 01:49:43 +0000 |
792 | @@ -602,8 +602,8 @@ |
793 | rows will be excluded from the final search. |
794 | |
795 | >>> from canonical.database.nl_search import nl_phrase_search |
796 | + >>> from canonical.database.sqlbase import quote |
797 | >>> from lp.answers.model.question import Question |
798 | - >>> from canonical.database.sqlbase import quote |
799 | |
800 | More than 50% of the questions matches firefox: |
801 | |
802 | @@ -689,8 +689,8 @@ |
803 | For example, there are less than 5 questions filed on the |
804 | mozilla-firefox source package. |
805 | |
806 | + >>> from canonical.database.sqlbase import sqlvalues |
807 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
808 | - >>> from canonical.database.sqlbase import sqlvalues |
809 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
810 | >>> firefox_package = ubuntu.getSourcePackage('mozilla-firefox') |
811 | >>> firefox_package_questions = Question.select( |
812 | |
813 | === modified file 'lib/canonical/launchpad/doc/timeout.txt' |
814 | --- lib/canonical/launchpad/doc/timeout.txt 2010-10-02 20:58:22 +0000 |
815 | +++ lib/canonical/launchpad/doc/timeout.txt 2010-10-20 01:49:43 +0000 |
816 | @@ -26,8 +26,8 @@ |
817 | The timeout to use is the number of seconds remaining before |
818 | db_statement_timeout is expired. |
819 | |
820 | + >>> from canonical.config import config |
821 | >>> from textwrap import dedent |
822 | - >>> from canonical.config import config |
823 | >>> config.push('timeout', dedent('''\ |
824 | ... [database] |
825 | ... db_statement_timeout = 10000''')) |
826 | @@ -88,9 +88,9 @@ |
827 | |
828 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
829 | >>> from lp.services.features.model import FeatureFlag, getFeatureStore |
830 | + >>> from lp.services.features import per_thread |
831 | + >>> from lp.services.features.flags import FeatureController |
832 | >>> from lp.services.features.webapp import ScopesFromRequest |
833 | - >>> from lp.services.features.flags import FeatureController |
834 | - >>> from lp.services.features import per_thread |
835 | |
836 | Install the feature flag to increase the timeout value. |
837 | |
838 | |
839 | === modified file 'lib/canonical/launchpad/doc/tokens-text-widget.txt' |
840 | --- lib/canonical/launchpad/doc/tokens-text-widget.txt 2010-10-09 16:36:22 +0000 |
841 | +++ lib/canonical/launchpad/doc/tokens-text-widget.txt 2010-10-20 01:49:43 +0000 |
842 | @@ -3,8 +3,8 @@ |
843 | This custom widget is used to normalise the space between words, |
844 | strip punctuation, and strip leading and trailing whitespace. |
845 | |
846 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
847 | >>> from canonical.widgets.textwidgets import TokensTextWidget |
848 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
849 | >>> from lp.answers.interfaces.faq import IFAQ |
850 | |
851 | The IFAQ keywords field requires a space separated list of terms. In the |
852 | |
853 | === modified file 'lib/canonical/launchpad/doc/validation.txt' |
854 | --- lib/canonical/launchpad/doc/validation.txt 2010-10-10 15:39:28 +0000 |
855 | +++ lib/canonical/launchpad/doc/validation.txt 2010-10-20 01:49:43 +0000 |
856 | @@ -7,9 +7,10 @@ |
857 | The validate_distrotask() function is used to guarantee that distribution |
858 | bugtasks are unique per bug. |
859 | |
860 | - >>> from canonical.launchpad.interfaces import ( |
861 | - ... IBugSet, IDistributionSet, ISourcePackageNameSet, |
862 | - ... validate_distrotask) |
863 | + >>> from canonical.launchpad.interfaces import validate_distrotask |
864 | + >>> from lp.bugs.interfaces.bug import IBugSet |
865 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
866 | + >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
867 | >>> bug_two = getUtility(IBugSet).get(2) |
868 | >>> debian = getUtility(IDistributionSet).getByName('debian') |
869 | >>> mozilla_firefox = getUtility( |
870 | @@ -31,8 +32,8 @@ |
871 | If the bug already has a distribution task with no source package, it's |
872 | not possible to add a another one. |
873 | |
874 | - >>> from canonical.launchpad.interfaces import ( |
875 | - ... CreateBugParams, IDistributionSet) |
876 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
877 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
878 | |
879 | >>> login('no-priv@canonical.com') |
880 | >>> no_priv = getUtility(ILaunchBag).user |
881 | @@ -57,8 +58,8 @@ |
882 | It's not allowed even if the sourcepackage has been published in a |
883 | PPA. |
884 | |
885 | + >>> from lp.soyuz.enums import PackagePublishingStatus |
886 | >>> from lp.soyuz.tests.ppa import publishToPPA |
887 | - >>> from lp.soyuz.enums import PackagePublishingStatus |
888 | >>> publishToPPA( |
889 | ... person_name='cprov', |
890 | ... sourcepackage_name='foobar', |
891 | |
892 | === modified file 'lib/canonical/launchpad/doc/vocabularies.txt' |
893 | --- lib/canonical/launchpad/doc/vocabularies.txt 2010-10-09 16:36:22 +0000 |
894 | +++ lib/canonical/launchpad/doc/vocabularies.txt 2010-10-20 01:49:43 +0000 |
895 | @@ -10,9 +10,11 @@ |
896 | |
897 | >>> from zope.component import getUtility |
898 | >>> from canonical.launchpad.ftests import ANONYMOUS, login |
899 | - >>> from canonical.launchpad.interfaces import ( |
900 | - ... IPersonSet, IOpenLaunchBag, IProductSet, IProjectGroupSet) |
901 | >>> from canonical.database.sqlbase import flush_database_updates |
902 | + >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag |
903 | + >>> from lp.registry.interfaces.person import IPersonSet |
904 | + >>> from lp.registry.interfaces.product import IProductSet |
905 | + >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet |
906 | >>> person_set = getUtility(IPersonSet) |
907 | >>> product_set = getUtility(IProductSet) |
908 | >>> login('foo.bar@canonical.com') |
909 | @@ -395,8 +397,8 @@ |
910 | Bug watches with an email address URL (i.e. starts with "mailto:") are |
911 | treated differently. |
912 | |
913 | - >>> from canonical.launchpad.interfaces import ( |
914 | - ... IBugWatchSet, IBugTrackerSet) |
915 | + >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
916 | + >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet |
917 | |
918 | >>> bug_twelve = getUtility(IBugSet).get(12) |
919 | >>> email_bugtracker = getUtility(IBugTrackerSet).getByName('email') |
920 | |
921 | === modified file 'lib/canonical/launchpad/doc/webapp-authorization.txt' |
922 | --- lib/canonical/launchpad/doc/webapp-authorization.txt 2010-10-18 10:11:04 +0000 |
923 | +++ lib/canonical/launchpad/doc/webapp-authorization.txt 2010-10-20 01:49:43 +0000 |
924 | @@ -5,8 +5,8 @@ |
925 | given object. This is the same check available in TALES as |
926 | something/required:permission.Name. |
927 | |
928 | + >>> from zope.component import getUtility |
929 | >>> from canonical.launchpad.webapp.authorization import check_permission |
930 | - >>> from zope.component import getUtility |
931 | >>> from lp.registry.interfaces.person import IPersonSet |
932 | |
933 | >>> personset = getUtility(IPersonSet) |
934 | @@ -60,8 +60,8 @@ |
935 | access to private objects. For instance, the above principal has |
936 | permission to read private and non-private objects (READ_PRIVATE). |
937 | |
938 | + >>> from canonical.launchpad.ftests import syncUpdate |
939 | >>> from lp.bugs.interfaces.bug import IBugSet |
940 | - >>> from canonical.launchpad.ftests import syncUpdate |
941 | >>> login('test@canonical.com') |
942 | >>> bug_1 = getUtility(IBugSet).get(1) |
943 | >>> bug_1.setPrivate(True, sample_person) |
944 | |
945 | === modified file 'lib/canonical/launchpad/doc/webapp-publication.txt' |
946 | --- lib/canonical/launchpad/doc/webapp-publication.txt 2010-10-09 16:36:22 +0000 |
947 | +++ lib/canonical/launchpad/doc/webapp-publication.txt 2010-10-20 01:49:43 +0000 |
948 | @@ -144,8 +144,8 @@ |
949 | ... LaunchpadBrowserPublication) |
950 | >>> from canonical.launchpad.webapp.servers import ( |
951 | ... LaunchpadBrowserRequest, VirtualHostRequestPublicationFactory) |
952 | + >>> from zope.app.publication.interfaces import IRequestPublicationFactory |
953 | >>> from canonical.launchpad.webapp.testing import verifyObject |
954 | - >>> from zope.app.publication.interfaces import IRequestPublicationFactory |
955 | |
956 | Those factories provide the IRequestPublicationFactory interface. |
957 | |
958 | @@ -909,10 +909,10 @@ |
959 | In the default implementation, the following database modification will |
960 | be automatically reverted in a GET request. |
961 | |
962 | + >>> from canonical.launchpad.database import EmailAddress |
963 | >>> from canonical.launchpad.ftests import syncUpdate |
964 | - >>> from canonical.launchpad.database import EmailAddress |
965 | + >>> from canonical.launchpad.interfaces.lpstorm import IMasterStore |
966 | >>> from lp.registry.model.person import Person |
967 | - >>> from canonical.launchpad.interfaces.lpstorm import IMasterStore |
968 | >>> login('foo.bar@canonical.com') |
969 | >>> txn = transaction.begin() |
970 | >>> def get_foo_bar_person(): |
971 | @@ -965,13 +965,13 @@ |
972 | the OAuthNonce table. |
973 | |
974 | >>> import time |
975 | + >>> from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet |
976 | >>> from canonical.launchpad.webapp.interfaces import OAuthPermission |
977 | >>> from lp.registry.interfaces.person import IPersonSet |
978 | - >>> from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet |
979 | |
980 | + >>> from zope.component import getUtility |
981 | >>> from canonical.launchpad.webapp.dbpolicy import MasterDatabasePolicy |
982 | >>> from canonical.launchpad.webapp.interfaces import IStoreSelector |
983 | - >>> from zope.component import getUtility |
984 | >>> getUtility(IStoreSelector).push(MasterDatabasePolicy()) |
985 | |
986 | >>> salgado = getUtility(IPersonSet).getByName('salgado') |
987 | |
988 | === modified file 'lib/canonical/launchpad/doc/webservice-configuration.txt' |
989 | --- lib/canonical/launchpad/doc/webservice-configuration.txt 2009-04-17 10:32:16 +0000 |
990 | +++ lib/canonical/launchpad/doc/webservice-configuration.txt 2010-10-20 01:49:43 +0000 |
991 | @@ -24,8 +24,8 @@ |
992 | based on the site configuration and whether the requesting user is a |
993 | developer. |
994 | |
995 | + >>> from canonical.config import config |
996 | >>> from textwrap import dedent |
997 | - >>> from canonical.config import config |
998 | |
999 | >>> from zope.interface import implements |
1000 | >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
1001 | |
1002 | === modified file 'lib/canonical/launchpad/doc/webservice-marshallers.txt' |
1003 | --- lib/canonical/launchpad/doc/webservice-marshallers.txt 2010-10-09 16:36:22 +0000 |
1004 | +++ lib/canonical/launchpad/doc/webservice-marshallers.txt 2010-10-20 01:49:43 +0000 |
1005 | @@ -8,8 +8,10 @@ |
1006 | application root. |
1007 | |
1008 | >>> from canonical.launchpad.webapp.adapter import set_request_started |
1009 | - >>> from canonical.launchpad.webapp.servers import WebServiceTestRequest |
1010 | - >>> from canonical.launchpad.webapp.servers import WebServicePublication |
1011 | + >>> from canonical.launchpad.webapp.servers import ( |
1012 | + ... WebServicePublication, |
1013 | + ... WebServiceTestRequest, |
1014 | + ... ) |
1015 | >>> request = WebServiceTestRequest(method='GET') |
1016 | >>> set_request_started() |
1017 | >>> request.setPublication(WebServicePublication(None)) |
1018 | @@ -29,12 +31,12 @@ |
1019 | string is a URL corresponding to a vocabulary item, the marshaller |
1020 | returns that item. Otherwise it raises a ValueError. |
1021 | |
1022 | - >>> from lp.registry.interfaces.person import IPerson |
1023 | >>> from zope.component import getMultiAdapter |
1024 | >>> from zope.schema import Choice |
1025 | + >>> from lazr.restful import EntryResource |
1026 | >>> from lazr.restful.fields import ReferenceChoice |
1027 | >>> from lazr.restful.interfaces import IFieldMarshaller |
1028 | - >>> from lazr.restful import EntryResource |
1029 | + >>> from lp.registry.interfaces.person import IPerson |
1030 | |
1031 | # Bind the field, to resolve the vocabulary name. |
1032 | >>> field = ReferenceChoice( |
1033 | |
1034 | === modified file 'lib/canonical/launchpad/doc/xmlrpc-authserver.txt' |
1035 | --- lib/canonical/launchpad/doc/xmlrpc-authserver.txt 2010-10-03 15:30:06 +0000 |
1036 | +++ lib/canonical/launchpad/doc/xmlrpc-authserver.txt 2010-10-20 01:49:43 +0000 |
1037 | @@ -3,8 +3,10 @@ |
1038 | The AuthServer interface is available on the authserver attribute |
1039 | of our private XMLRPC instance. |
1040 | |
1041 | - >>> from canonical.launchpad.interfaces import ( |
1042 | - ... IAuthServerApplication, IPrivateApplication) |
1043 | + >>> from canonical.launchpad.interfaces.launchpad import ( |
1044 | + ... IAuthServerApplication, |
1045 | + ... IPrivateApplication, |
1046 | + ... ) |
1047 | >>> from canonical.launchpad.webapp.testing import verifyObject |
1048 | |
1049 | >>> private_root = getUtility(IPrivateApplication) |
1050 | |
1051 | === modified file 'lib/canonical/launchpad/interfaces/ftests/validation.txt' |
1052 | --- lib/canonical/launchpad/interfaces/ftests/validation.txt 2010-10-03 15:30:06 +0000 |
1053 | +++ lib/canonical/launchpad/interfaces/ftests/validation.txt 2010-10-20 01:49:43 +0000 |
1054 | @@ -1,16 +1,17 @@ |
1055 | = Launchpad field validators = |
1056 | |
1057 | >>> from zope.component import getUtility |
1058 | - >>> from canonical.launchpad.interfaces import ( |
1059 | - ... CreateBugParams, IOpenLaunchBag, IPersonSet, IProductSet) |
1060 | + >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag |
1061 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
1062 | + >>> from lp.registry.interfaces.person import IPersonSet |
1063 | + >>> from lp.registry.interfaces.product import IProductSet |
1064 | |
1065 | == can_be_nominated_for_series == |
1066 | |
1067 | This validator is used to check if the bug in the launchbag can be |
1068 | nominated for the given series. |
1069 | |
1070 | - >>> from canonical.launchpad.interfaces import ( |
1071 | - ... can_be_nominated_for_series) |
1072 | + >>> from canonical.launchpad.interfaces import can_be_nominated_for_series |
1073 | |
1074 | If we create a new bug, all the target's series can be nominated. |
1075 | |
1076 | |
1077 | === modified file 'lib/canonical/launchpad/pagetests/feeds/xx-links.txt' |
1078 | --- lib/canonical/launchpad/pagetests/feeds/xx-links.txt 2010-10-03 15:30:06 +0000 |
1079 | +++ lib/canonical/launchpad/pagetests/feeds/xx-links.txt 2010-10-20 01:49:43 +0000 |
1080 | @@ -116,8 +116,11 @@ |
1081 | >>> from canonical.database.sqlbase import flush_database_updates |
1082 | >>> login('foo.bar@canonical.com') |
1083 | >>> from zope.component import getUtility |
1084 | - >>> from canonical.launchpad.interfaces import ( |
1085 | - ... ILaunchBag, IProductSet, License) |
1086 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
1087 | + >>> from lp.registry.interfaces.product import ( |
1088 | + ... IProductSet, |
1089 | + ... License, |
1090 | + ... ) |
1091 | >>> user = getUtility(ILaunchBag).user |
1092 | >>> getUtility(IProductSet).createProduct( |
1093 | ... user, 'bad-displayname', |
1094 | |
1095 | === modified file 'lib/canonical/launchpad/pagetests/oauth/access-token.txt' |
1096 | --- lib/canonical/launchpad/pagetests/oauth/access-token.txt 2010-10-03 15:30:06 +0000 |
1097 | +++ lib/canonical/launchpad/pagetests/oauth/access-token.txt 2010-10-20 01:49:43 +0000 |
1098 | @@ -5,10 +5,11 @@ |
1099 | access token. |
1100 | |
1101 | # First we create a new request token and review it. |
1102 | + >>> from zope.component import getUtility |
1103 | + >>> from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet |
1104 | >>> from canonical.launchpad.webapp.interfaces import OAuthPermission |
1105 | - >>> from canonical.launchpad.interfaces import ( |
1106 | - ... IOAuthConsumerSet, IPersonSet, IProductSet) |
1107 | - >>> from zope.component import getUtility |
1108 | + >>> from lp.registry.interfaces.person import IPersonSet |
1109 | + >>> from lp.registry.interfaces.product import IProductSet |
1110 | >>> from canonical.launchpad.ftests import login, logout |
1111 | >>> login('salgado@ubuntu.com') |
1112 | >>> consumer = getUtility(IOAuthConsumerSet).getByKey('foobar123451432') |
1113 | |
1114 | === modified file 'lib/canonical/launchpad/pagetests/oauth/authorize-token.txt' |
1115 | --- lib/canonical/launchpad/pagetests/oauth/authorize-token.txt 2010-10-18 10:11:04 +0000 |
1116 | +++ lib/canonical/launchpad/pagetests/oauth/authorize-token.txt 2010-10-20 01:49:43 +0000 |
1117 | @@ -5,8 +5,8 @@ |
1118 | and authorize or not the consumer to act on his behalf. |
1119 | |
1120 | # Create a new request token. |
1121 | + >>> from zope.component import getUtility |
1122 | >>> from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet |
1123 | - >>> from zope.component import getUtility |
1124 | >>> from canonical.launchpad.ftests import ANONYMOUS, login, logout |
1125 | >>> login('salgado@ubuntu.com') |
1126 | >>> consumer = getUtility(IOAuthConsumerSet).getByKey('foobar123451432') |
1127 | |
1128 | === modified file 'lib/canonical/launchpad/pagetests/oauth/managing-tokens.txt' |
1129 | --- lib/canonical/launchpad/pagetests/oauth/managing-tokens.txt 2010-10-03 15:30:06 +0000 |
1130 | +++ lib/canonical/launchpad/pagetests/oauth/managing-tokens.txt 2010-10-20 01:49:43 +0000 |
1131 | @@ -5,9 +5,10 @@ |
1132 | |
1133 | # Create a request token, but don't convert it to an access token. |
1134 | >>> from zope.component import getUtility |
1135 | + >>> from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet |
1136 | >>> from canonical.launchpad.webapp.interfaces import OAuthPermission |
1137 | - >>> from canonical.launchpad.interfaces import ( |
1138 | - ... IOAuthConsumerSet, IPersonSet, IProductSet) |
1139 | + >>> from lp.registry.interfaces.person import IPersonSet |
1140 | + >>> from lp.registry.interfaces.product import IProductSet |
1141 | >>> login('salgado@ubuntu.com') |
1142 | >>> token = getUtility(IOAuthConsumerSet).getByKey( |
1143 | ... 'foobar123451432').newRequestToken() |
1144 | |
1145 | === modified file 'lib/canonical/launchpad/pagetests/standalone/xx-opstats.txt' |
1146 | --- lib/canonical/launchpad/pagetests/standalone/xx-opstats.txt 2010-10-09 16:36:22 +0000 |
1147 | +++ lib/canonical/launchpad/pagetests/standalone/xx-opstats.txt 2010-10-20 01:49:43 +0000 |
1148 | @@ -261,8 +261,8 @@ |
1149 | |
1150 | But our database connections are broken. |
1151 | |
1152 | + >>> from canonical.launchpad.interfaces.lpstorm import IStore |
1153 | >>> from lp.registry.model.person import Person |
1154 | - >>> from canonical.launchpad.interfaces.lpstorm import IStore |
1155 | >>> IStore(Person).find(Person, name='janitor') |
1156 | Traceback (most recent call last): |
1157 | ... |
1158 | |
1159 | === modified file 'lib/canonical/launchpad/pagetests/standalone/xx-request-expired.txt' |
1160 | --- lib/canonical/launchpad/pagetests/standalone/xx-request-expired.txt 2010-07-05 19:25:14 +0000 |
1161 | +++ lib/canonical/launchpad/pagetests/standalone/xx-request-expired.txt 2010-10-20 01:49:43 +0000 |
1162 | @@ -6,9 +6,9 @@ |
1163 | slightly longer then the soft_request_timeout value to generate, thus |
1164 | causing a soft timeout to be logged. |
1165 | |
1166 | - >>> from textwrap import dedent |
1167 | >>> from canonical.config import config |
1168 | >>> from canonical.launchpad.webapp.errorlog import globalErrorUtility |
1169 | + >>> from textwrap import dedent |
1170 | >>> old_lastid = globalErrorUtility.getLastOopsReport().id |
1171 | >>> test_data = dedent(""" |
1172 | ... [database] |
1173 | |
1174 | === modified file 'lib/canonical/launchpad/pagetests/standalone/xx-soft-timeout.txt' |
1175 | --- lib/canonical/launchpad/pagetests/standalone/xx-soft-timeout.txt 2010-07-05 19:25:14 +0000 |
1176 | +++ lib/canonical/launchpad/pagetests/standalone/xx-soft-timeout.txt 2010-10-20 01:49:43 +0000 |
1177 | @@ -39,8 +39,8 @@ |
1178 | slightly longer then the soft_request_timeout value to generate, thus |
1179 | causing a soft timeout to be logged. |
1180 | |
1181 | + >>> from canonical.launchpad.webapp.errorlog import globalErrorUtility |
1182 | >>> from textwrap import dedent |
1183 | - >>> from canonical.launchpad.webapp.errorlog import globalErrorUtility |
1184 | >>> old_lastid = globalErrorUtility.getLastOopsReport().id |
1185 | >>> test_data = (dedent(""" |
1186 | ... [database] |
1187 | |
1188 | === modified file 'lib/canonical/launchpad/pagetests/webservice/xx-service.txt' |
1189 | --- lib/canonical/launchpad/pagetests/webservice/xx-service.txt 2010-10-09 16:36:22 +0000 |
1190 | +++ lib/canonical/launchpad/pagetests/webservice/xx-service.txt 2010-10-20 01:49:43 +0000 |
1191 | @@ -45,8 +45,8 @@ |
1192 | >>> config.push('beta_data', beta_data) |
1193 | |
1194 | >>> from lp.testing import ANONYMOUS, login, logout |
1195 | + >>> from zope.component import getUtility |
1196 | >>> from canonical.launchpad.testing.pages import webservice_for_person |
1197 | - >>> from zope.component import getUtility |
1198 | >>> from lp.registry.interfaces.person import IPersonSet |
1199 | >>> login(ANONYMOUS) |
1200 | >>> beta_admin = getUtility(IPersonSet).getByEmail( |
1201 | |
1202 | === modified file 'lib/canonical/launchpad/pagetests/webservice/xx-wadl.txt' |
1203 | --- lib/canonical/launchpad/pagetests/webservice/xx-wadl.txt 2010-03-29 14:30:51 +0000 |
1204 | +++ lib/canonical/launchpad/pagetests/webservice/xx-wadl.txt 2010-10-20 01:49:43 +0000 |
1205 | @@ -61,8 +61,8 @@ |
1206 | |
1207 | Unlike the test strings we used earlier, this is a valid WADL file. |
1208 | |
1209 | + >>> from canonical.lazr.xml import XMLValidator |
1210 | >>> from lazr.restful import WADL_SCHEMA_FILE |
1211 | - >>> from canonical.lazr.xml import XMLValidator |
1212 | >>> wadl_schema = XMLValidator(WADL_SCHEMA_FILE) |
1213 | |
1214 | # We need to replace the nbsp entity, because the validator |
1215 | |
1216 | === modified file 'lib/canonical/launchpad/webapp/ftests/test_adapter_timeout.txt.disabled' |
1217 | --- lib/canonical/launchpad/webapp/ftests/test_adapter_timeout.txt.disabled 2009-06-02 08:20:49 +0000 |
1218 | +++ lib/canonical/launchpad/webapp/ftests/test_adapter_timeout.txt.disabled 2010-10-20 01:49:43 +0000 |
1219 | @@ -16,9 +16,9 @@ |
1220 | First we create a view that will provoke a TimeoutError, a view for the |
1221 | exception, and a time machine. |
1222 | |
1223 | + >>> from zope.publisher.browser import BrowserView |
1224 | + >>> from zope.testbrowser.testing import Browser |
1225 | >>> from textwrap import dedent |
1226 | - >>> from zope.testbrowser.testing import Browser |
1227 | - >>> from zope.publisher.browser import BrowserView |
1228 | >>> from zope.publisher.interfaces.browser import ( |
1229 | ... IBrowserRequest, IBrowserView, IBrowserPublisher) |
1230 | >>> from zope.interface import Interface, implements |
1231 | |
1232 | === modified file 'lib/canonical/launchpad/webapp/tests/test_preferredcharsets.txt' |
1233 | --- lib/canonical/launchpad/webapp/tests/test_preferredcharsets.txt 2006-07-14 14:45:31 +0000 |
1234 | +++ lib/canonical/launchpad/webapp/tests/test_preferredcharsets.txt 2010-10-20 01:49:43 +0000 |
1235 | @@ -1,8 +1,8 @@ |
1236 | We have a custom IUserPreferredCharsets which always returns |
1237 | utf-8 as the preferred charset. |
1238 | |
1239 | + >>> from zope.publisher.browser import TestRequest |
1240 | >>> from canonical.launchpad.webapp import Utf8PreferredCharsets |
1241 | - >>> from zope.publisher.browser import TestRequest |
1242 | >>> user_preferred = Utf8PreferredCharsets(TestRequest()) |
1243 | |
1244 | >>> from zope.i18n.interfaces import IUserPreferredCharsets |
1245 | |
1246 | === modified file 'lib/canonical/launchpad/webapp/tests/test_request_expire_render.txt' |
1247 | --- lib/canonical/launchpad/webapp/tests/test_request_expire_render.txt 2010-09-13 04:45:59 +0000 |
1248 | +++ lib/canonical/launchpad/webapp/tests/test_request_expire_render.txt 2010-10-20 01:49:43 +0000 |
1249 | @@ -12,8 +12,8 @@ |
1250 | since get_request_remaining_seconds will raise. However, if the user is logged |
1251 | in, a query will be issued to render the "Logged in as No Privileges Person". |
1252 | |
1253 | + >>> from canonical.config import config |
1254 | >>> from textwrap import dedent |
1255 | - >>> from canonical.config import config |
1256 | >>> test_data = dedent(""" |
1257 | ... [database] |
1258 | ... db_statement_timeout: 10000 |
1259 | |
1260 | === modified file 'lib/canonical/lazr/doc/menus.txt' |
1261 | --- lib/canonical/lazr/doc/menus.txt 2010-09-28 19:10:51 +0000 |
1262 | +++ lib/canonical/lazr/doc/menus.txt 2010-10-20 01:49:43 +0000 |
1263 | @@ -76,8 +76,8 @@ |
1264 | # objects. This function does most of the work, but views must be |
1265 | # assigned to the _last_obj_traversed attribute. |
1266 | |
1267 | + >>> from canonical.launchpad.webapp import canonical_url |
1268 | >>> from canonical.lazr.testing.menus import make_fake_request |
1269 | - >>> from canonical.launchpad.webapp import canonical_url |
1270 | |
1271 | >>> root = Root('', None) |
1272 | >>> cookbook = Cookbook('joy-of-cooking', root) |
1273 | @@ -932,8 +932,8 @@ |
1274 | >>> from zope.traversing.adapters import DefaultTraversable |
1275 | >>> from zope.traversing.interfaces import IPathAdapter, ITraversable |
1276 | >>> from canonical.launchpad.ftests import test_tales |
1277 | + >>> from canonical.lazr.testing.menus import summarise_tal_links |
1278 | >>> from lp.app.browser.tales import MenuAPI |
1279 | - >>> from canonical.lazr.testing.menus import summarise_tal_links |
1280 | |
1281 | # MenuAPI is normally registered as an IPathAdapter in ZCML. This |
1282 | # approximates what is done by the code: |
1283 | |
1284 | === modified file 'lib/canonical/lazr/doc/timeout.txt' |
1285 | --- lib/canonical/lazr/doc/timeout.txt 2010-04-22 18:53:09 +0000 |
1286 | +++ lib/canonical/lazr/doc/timeout.txt 2010-10-20 01:49:43 +0000 |
1287 | @@ -10,8 +10,8 @@ |
1288 | The time to wait can be passed using the timeout parameter to the |
1289 | decorator. |
1290 | |
1291 | + >>> from canonical.lazr.timeout import with_timeout |
1292 | >>> from select import select |
1293 | - >>> from canonical.lazr.timeout import with_timeout |
1294 | |
1295 | >>> @with_timeout(timeout=0.5) |
1296 | ... def wait_for(time): |
1297 | |
1298 | === modified file 'lib/lp/answers/browser/tests/views.txt' |
1299 | --- lib/lp/answers/browser/tests/views.txt 2010-07-30 12:56:27 +0000 |
1300 | +++ lib/lp/answers/browser/tests/views.txt 2010-10-20 01:49:43 +0000 |
1301 | @@ -100,8 +100,8 @@ |
1302 | |
1303 | # Setup a harness to easily test the view. |
1304 | |
1305 | - >>> from canonical.launchpad.ftests import LaunchpadFormHarness |
1306 | >>> from canonical.launchpad.browser import QuestionWorkflowView |
1307 | + >>> from canonical.launchpad.ftests import LaunchpadFormHarness |
1308 | >>> workflow_harness = LaunchpadFormHarness( |
1309 | ... firefox_question, QuestionWorkflowView) |
1310 | |
1311 | @@ -708,8 +708,8 @@ |
1312 | retrieve the set of languages in which the user is assumed to be |
1313 | interested. |
1314 | |
1315 | + >>> from canonical.launchpad.browser import UserSupportLanguagesMixin |
1316 | >>> from canonical.launchpad.webapp import LaunchpadView |
1317 | - >>> from canonical.launchpad.browser import UserSupportLanguagesMixin |
1318 | |
1319 | >>> class UserSupportLanguagesView(UserSupportLanguagesMixin, |
1320 | ... LaunchpadView): |
1321 | |
1322 | === modified file 'lib/lp/answers/doc/emailinterface.txt.disabled' |
1323 | --- lib/lp/answers/doc/emailinterface.txt.disabled 2010-10-04 19:50:45 +0000 |
1324 | +++ lib/lp/answers/doc/emailinterface.txt.disabled 2010-10-20 01:49:43 +0000 |
1325 | @@ -98,17 +98,17 @@ |
1326 | # be the question owner and Sample Person who will play the role of |
1327 | # answer contact. Foo Bar is used to change the status of the |
1328 | # question. |
1329 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1330 | >>> from lp.registry.interfaces.person import IPersonSet |
1331 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
1332 | >>> login('no-priv@canonical.com') |
1333 | >>> personset = getUtility(IPersonSet) |
1334 | >>> sample_person = personset.getByEmail('test@canonical.com') |
1335 | >>> no_priv = personset.getByEmail('no-priv@canonical.com') |
1336 | >>> foo_bar = personset.getByEmail('foo.bar@canonical.com') |
1337 | |
1338 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
1339 | >>> from canonical.config import config |
1340 | >>> from canonical.database.sqlbase import commit |
1341 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
1342 | |
1343 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
1344 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1345 | |
1346 | === modified file 'lib/lp/answers/doc/expiration.txt' |
1347 | --- lib/lp/answers/doc/expiration.txt 2010-07-30 12:56:27 +0000 |
1348 | +++ lib/lp/answers/doc/expiration.txt 2010-10-20 01:49:43 +0000 |
1349 | @@ -19,8 +19,8 @@ |
1350 | |
1351 | # Sanity check in case somebody modifies the question sampledata and |
1352 | # forget to update this script. |
1353 | + >>> from lp.answers.interfaces.questionenums import QuestionStatus |
1354 | >>> from lp.answers.model.question import Question |
1355 | - >>> from lp.answers.interfaces.questionenums import QuestionStatus |
1356 | >>> Question.select('status IN (%i,%i)' % ( |
1357 | ... QuestionStatus.OPEN.value, |
1358 | ... QuestionStatus.NEEDSINFO.value)).count() |
1359 | @@ -43,8 +43,8 @@ |
1360 | >>> two_weeks_ago = now - timedelta(days=14) |
1361 | >>> a_month_ago = now - timedelta(days=31) |
1362 | >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
1363 | + >>> from lp.answers.interfaces.questioncollection import IQuestionSet |
1364 | >>> from lp.registry.interfaces.person import IPersonSet |
1365 | - >>> from lp.answers.interfaces.questioncollection import IQuestionSet |
1366 | >>> login('no-priv@canonical.com') |
1367 | >>> no_priv = getUtility(ILaunchBag).user |
1368 | |
1369 | |
1370 | === modified file 'lib/lp/answers/doc/faq-vocabulary.txt' |
1371 | --- lib/lp/answers/doc/faq-vocabulary.txt 2010-08-02 02:33:53 +0000 |
1372 | +++ lib/lp/answers/doc/faq-vocabulary.txt 2010-10-20 01:49:43 +0000 |
1373 | @@ -4,10 +4,10 @@ |
1374 | collection. It provides the IHugeVocabulary interface. |
1375 | |
1376 | >>> from zope.component import getUtility |
1377 | - >>> from lp.registry.interfaces.product import IProductSet |
1378 | + >>> from zope.schema.vocabulary import getVocabularyRegistry |
1379 | >>> from canonical.launchpad.webapp.testing import verifyObject |
1380 | >>> from canonical.launchpad.webapp.vocabulary import IHugeVocabulary |
1381 | - >>> from zope.schema.vocabulary import getVocabularyRegistry |
1382 | + >>> from lp.registry.interfaces.product import IProductSet |
1383 | |
1384 | >>> vocabulary_registry = getVocabularyRegistry() |
1385 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
1386 | |
1387 | === modified file 'lib/lp/answers/doc/faq.txt' |
1388 | --- lib/lp/answers/doc/faq.txt 2010-07-30 12:56:27 +0000 |
1389 | +++ lib/lp/answers/doc/faq.txt 2010-10-20 01:49:43 +0000 |
1390 | @@ -10,12 +10,12 @@ |
1391 | are associated to distributions or products. The IFAQTarget interface is |
1392 | provided by objects that can host FAQs. |
1393 | |
1394 | + >>> from zope.security.proxy import removeSecurityProxy |
1395 | >>> from canonical.launchpad.webapp.testing import verifyObject |
1396 | - >>> from zope.security.proxy import removeSecurityProxy |
1397 | |
1398 | + >>> from lp.answers.interfaces.faqtarget import IFAQTarget |
1399 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
1400 | >>> from lp.registry.interfaces.product import IProductSet |
1401 | - >>> from lp.answers.interfaces.faqtarget import IFAQTarget |
1402 | |
1403 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
1404 | |
1405 | |
1406 | === modified file 'lib/lp/answers/doc/faqtarget.txt' |
1407 | --- lib/lp/answers/doc/faqtarget.txt 2010-10-03 15:30:06 +0000 |
1408 | +++ lib/lp/answers/doc/faqtarget.txt 2010-10-20 01:49:43 +0000 |
1409 | @@ -31,8 +31,8 @@ |
1410 | the target. |
1411 | |
1412 | >>> login('no-priv@canonical.com') |
1413 | - >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
1414 | >>> from canonical.launchpad.webapp.authorization import check_permission |
1415 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
1416 | >>> check_permission('launchpad.Append', target) |
1417 | False |
1418 | |
1419 | |
1420 | === modified file 'lib/lp/answers/doc/notifications.txt' |
1421 | --- lib/lp/answers/doc/notifications.txt 2010-07-30 12:56:27 +0000 |
1422 | +++ lib/lp/answers/doc/notifications.txt 2010-10-20 01:49:43 +0000 |
1423 | @@ -83,8 +83,8 @@ |
1424 | Register the Ubuntu Team as Ubuntu's answer contact, so that they get |
1425 | notified about the changes as well: |
1426 | |
1427 | - >>> from lp.services.worlddata.interfaces.language import ILanguageSet |
1428 | >>> from lp.registry.interfaces.person import IPersonSet |
1429 | + >>> from lp.services.worlddata.interfaces.language import ILanguageSet |
1430 | >>> ubuntu_team = getUtility(IPersonSet).getByName('ubuntu-team') |
1431 | >>> ubuntu_team.addLanguage(getUtility(ILanguageSet)['en']) |
1432 | >>> ubuntu.addAnswerContact(ubuntu_team) |
1433 | @@ -103,9 +103,9 @@ |
1434 | If we edit the title and description of the question, a notification |
1435 | will be sent. |
1436 | |
1437 | + >>> from zope.interface import providedBy |
1438 | >>> from lazr.lifecycle.event import ObjectModifiedEvent |
1439 | >>> from lazr.lifecycle.snapshot import Snapshot |
1440 | - >>> from zope.interface import providedBy |
1441 | |
1442 | >>> login('no-priv@canonical.com') |
1443 | >>> no_priv = getUtility(ILaunchBag).user |
1444 | |
1445 | === modified file 'lib/lp/answers/doc/person.txt' |
1446 | --- lib/lp/answers/doc/person.txt 2010-06-09 17:07:49 +0000 |
1447 | +++ lib/lp/answers/doc/person.txt 2010-10-20 01:49:43 +0000 |
1448 | @@ -14,8 +14,8 @@ |
1449 | commented on, or answered. Various subsets can be selected by using the |
1450 | various search criteria. |
1451 | |
1452 | + >>> from lp.answers.interfaces.questionsperson import IQuestionsPerson |
1453 | >>> from lp.registry.interfaces.person import IPersonSet |
1454 | - >>> from lp.answers.interfaces.questionsperson import IQuestionsPerson |
1455 | >>> personset = getUtility(IPersonSet) |
1456 | >>> foo_bar_raw = personset.getByEmail('foo.bar@canonical.com') |
1457 | >>> foo_bar = IQuestionsPerson(foo_bar_raw) |
1458 | |
1459 | === modified file 'lib/lp/answers/doc/projectgroup.txt' |
1460 | --- lib/lp/answers/doc/projectgroup.txt 2010-07-30 12:56:27 +0000 |
1461 | +++ lib/lp/answers/doc/projectgroup.txt 2010-10-20 01:49:43 +0000 |
1462 | @@ -24,8 +24,8 @@ |
1463 | You can search for all questions filed against projects in a project using the |
1464 | project group's searchQuestions() method. |
1465 | |
1466 | + >>> from lp.registry.interfaces.person import IPersonSet |
1467 | >>> from lp.registry.interfaces.product import IProductSet |
1468 | - >>> from lp.registry.interfaces.person import IPersonSet |
1469 | |
1470 | >>> login('test@canonical.com') |
1471 | >>> thunderbird = getUtility(IProductSet).getByName('thunderbird') |
1472 | |
1473 | === modified file 'lib/lp/answers/doc/question.txt' |
1474 | --- lib/lp/answers/doc/question.txt 2010-10-03 15:30:06 +0000 |
1475 | +++ lib/lp/answers/doc/question.txt 2010-10-20 01:49:43 +0000 |
1476 | @@ -11,9 +11,9 @@ |
1477 | >>> login('test@canonical.com') |
1478 | |
1479 | >>> from canonical.launchpad.webapp.testing import verifyObject |
1480 | + >>> from lp.answers.interfaces.questiontarget import IQuestionTarget |
1481 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1482 | >>> from lp.registry.interfaces.person import IPersonSet |
1483 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
1484 | - >>> from lp.answers.interfaces.questiontarget import IQuestionTarget |
1485 | >>> from lp.registry.interfaces.product import IProductSet |
1486 | |
1487 | >>> firefox = getUtility(IProductSet)['firefox'] |
1488 | @@ -86,8 +86,8 @@ |
1489 | |
1490 | Questions are manipulated through the IQuestion interface. |
1491 | |
1492 | + >>> from zope.security.proxy import removeSecurityProxy |
1493 | >>> from lp.answers.interfaces.question import IQuestion |
1494 | - >>> from zope.security.proxy import removeSecurityProxy |
1495 | |
1496 | # The complete interface is not necessarily available to the |
1497 | # logged in user. |
1498 | |
1499 | === modified file 'lib/lp/answers/doc/questionsets.txt' |
1500 | --- lib/lp/answers/doc/questionsets.txt 2010-10-03 15:30:06 +0000 |
1501 | +++ lib/lp/answers/doc/questionsets.txt 2010-10-20 01:49:43 +0000 |
1502 | @@ -177,10 +177,10 @@ |
1503 | |
1504 | Then some recent questions are created on a number of projects. |
1505 | |
1506 | + >>> from lp.answers.testing import QuestionFactory |
1507 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
1508 | >>> from lp.registry.interfaces.person import IPersonSet |
1509 | >>> from lp.registry.interfaces.product import IProductSet |
1510 | - >>> from lp.answers.testing import QuestionFactory |
1511 | |
1512 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
1513 | >>> landscape = getUtility(IProductSet).getByName('landscape') |
1514 | |
1515 | === modified file 'lib/lp/answers/doc/questiontarget.txt' |
1516 | --- lib/lp/answers/doc/questiontarget.txt 2010-10-03 15:30:06 +0000 |
1517 | +++ lib/lp/answers/doc/questiontarget.txt 2010-10-20 01:49:43 +0000 |
1518 | @@ -532,9 +532,9 @@ |
1519 | copied to the question. |
1520 | |
1521 | >>> from datetime import datetime |
1522 | - >>> from pytz import UTC |
1523 | >>> from lp.bugs.interfaces.bug import CreateBugParams |
1524 | >>> from lp.registry.interfaces.product import IProductSet |
1525 | + >>> from pytz import UTC |
1526 | |
1527 | >>> now = datetime.now(UTC) |
1528 | >>> target = getUtility(IProductSet)['jokosher'] |
1529 | |
1530 | === modified file 'lib/lp/answers/doc/workflow.txt' |
1531 | --- lib/lp/answers/doc/workflow.txt 2010-10-03 15:30:06 +0000 |
1532 | +++ lib/lp/answers/doc/workflow.txt 2010-10-20 01:49:43 +0000 |
1533 | @@ -602,8 +602,8 @@ |
1534 | # Register an event listener that will print events it receives. |
1535 | >>> from lazr.lifecycle.interfaces import ( |
1536 | ... IObjectCreatedEvent, IObjectModifiedEvent) |
1537 | + >>> from canonical.lazr.testing.event import TestEventListener |
1538 | >>> from lp.answers.interfaces.question import IQuestion |
1539 | - >>> from canonical.lazr.testing.event import TestEventListener |
1540 | |
1541 | >>> def print_event(object, event): |
1542 | ... print "Received %s on %s" % ( |
1543 | |
1544 | === modified file 'lib/lp/answers/stories/distribution-package-answer-contact.txt' |
1545 | --- lib/lp/answers/stories/distribution-package-answer-contact.txt 2010-07-30 12:56:27 +0000 |
1546 | +++ lib/lp/answers/stories/distribution-package-answer-contact.txt 2010-10-20 01:49:43 +0000 |
1547 | @@ -7,10 +7,10 @@ |
1548 | # Register a Sample Person as an answer contact for the distribution. |
1549 | >>> from zope.component import getUtility |
1550 | >>> from canonical.launchpad.ftests import login, logout |
1551 | + >>> from canonical.database.sqlbase import flush_database_updates |
1552 | >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
1553 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1554 | >>> from lp.services.worlddata.interfaces.language import ILanguageSet |
1555 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
1556 | - >>> from canonical.database.sqlbase import flush_database_updates |
1557 | >>> login('test@canonical.com') |
1558 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
1559 | >>> # Answer contacts must speak a language |
1560 | |
1561 | === modified file 'lib/lp/answers/tests/questiontarget-sourcepackage.txt' |
1562 | --- lib/lp/answers/tests/questiontarget-sourcepackage.txt 2010-07-30 12:56:27 +0000 |
1563 | +++ lib/lp/answers/tests/questiontarget-sourcepackage.txt 2010-10-20 01:49:43 +0000 |
1564 | @@ -13,8 +13,8 @@ |
1565 | of the DistributionSourcePackage (and not the SourcePackage): |
1566 | |
1567 | >>> login('no-priv@canonical.com') |
1568 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1569 | >>> from lp.registry.interfaces.person import IPersonSet |
1570 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
1571 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
1572 | >>> firefox = ubuntu.currentseries.getSourcePackage('mozilla-firefox') |
1573 | |
1574 | |
1575 | === modified file 'lib/lp/app/browser/tests/base-layout.txt' |
1576 | --- lib/lp/app/browser/tests/base-layout.txt 2010-09-29 03:26:01 +0000 |
1577 | +++ lib/lp/app/browser/tests/base-layout.txt 2010-10-20 01:49:43 +0000 |
1578 | @@ -10,9 +10,9 @@ |
1579 | in the root element of the page template. The base layout template uses the |
1580 | YUI grid classes for positioning. |
1581 | |
1582 | - >>> from z3c.ptcompat import ViewPageTemplateFile |
1583 | >>> from canonical.launchpad.webapp.publisher import LaunchpadView |
1584 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
1585 | + >>> from z3c.ptcompat import ViewPageTemplateFile |
1586 | |
1587 | >>> user = factory.makePerson(name='waffles') |
1588 | >>> request = LaunchpadTestRequest( |
1589 | |
1590 | === modified file 'lib/lp/app/browser/tests/launchpadform-view.txt' |
1591 | --- lib/lp/app/browser/tests/launchpadform-view.txt 2010-06-22 17:12:23 +0000 |
1592 | +++ lib/lp/app/browser/tests/launchpadform-view.txt 2010-10-20 01:49:43 +0000 |
1593 | @@ -6,15 +6,15 @@ |
1594 | widget rendering is wrapped with a <div> using the widget_class, which |
1595 | can be used for subordinate field indentation, for example. |
1596 | |
1597 | - >>> from z3c.ptcompat import ViewPageTemplateFile |
1598 | >>> from zope.app.form.browser import TextWidget |
1599 | >>> from zope.interface import Interface |
1600 | >>> from zope.schema import TextLine |
1601 | >>> from canonical.config import config |
1602 | + >>> from z3c.ptcompat import ViewPageTemplateFile |
1603 | >>> from canonical.launchpad.webapp.launchpadform import ( |
1604 | ... custom_widget, LaunchpadFormView) |
1605 | + >>> from canonical.launchpad.testing.pages import find_tags_by_class |
1606 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
1607 | - >>> from canonical.launchpad.testing.pages import find_tags_by_class |
1608 | |
1609 | >>> class ITestSchema(Interface): |
1610 | ... displayname = TextLine(title=u"Title") |
1611 | |
1612 | === modified file 'lib/lp/app/doc/tales.txt' |
1613 | --- lib/lp/app/doc/tales.txt 2010-10-09 16:36:22 +0000 |
1614 | +++ lib/lp/app/doc/tales.txt 2010-10-20 01:49:43 +0000 |
1615 | @@ -113,8 +113,8 @@ |
1616 | |
1617 | And finally Copy archives. |
1618 | |
1619 | + >>> from lp.soyuz.enums import ArchivePurpose |
1620 | >>> from lp.soyuz.interfaces.archive import IArchiveSet |
1621 | - >>> from lp.soyuz.enums import ArchivePurpose |
1622 | >>> copy = getUtility(IArchiveSet).new( |
1623 | ... owner=mark, purpose=ArchivePurpose.COPY, |
1624 | ... distribution=ubuntu, name='rebuild') |
1625 | @@ -197,8 +197,8 @@ |
1626 | |
1627 | The 'building' build is 14x14: |
1628 | |
1629 | + >>> from zope.security.proxy import removeSecurityProxy |
1630 | >>> from lp.buildmaster.enums import BuildStatus |
1631 | - >>> from zope.security.proxy import removeSecurityProxy |
1632 | >>> removeSecurityProxy(build).status = BuildStatus.BUILDING |
1633 | >>> print test_tales("build/image:icon", build=build) |
1634 | <img width="14" height="14"...src="/@@/processing" /> |
1635 | @@ -1181,8 +1181,8 @@ |
1636 | |
1637 | Test the 'fmt:url' namespace for canonical urls. |
1638 | |
1639 | + >>> from zope.interface import implements |
1640 | >>> from canonical.launchpad.webapp.interfaces import ICanonicalUrlData |
1641 | - >>> from zope.interface import implements |
1642 | >>> class ObjectThatHasUrl: |
1643 | ... implements(ICanonicalUrlData) |
1644 | ... path = 'bonobo/saki' |
1645 | |
1646 | === modified file 'lib/lp/app/stories/basics/xx-beta-testers-redirection.txt' |
1647 | --- lib/lp/app/stories/basics/xx-beta-testers-redirection.txt 2010-10-03 15:30:06 +0000 |
1648 | +++ lib/lp/app/stories/basics/xx-beta-testers-redirection.txt 2010-10-20 01:49:43 +0000 |
1649 | @@ -203,8 +203,8 @@ |
1650 | Add Foo Bar to the beta team. |
1651 | |
1652 | >>> from zope.component import getUtility |
1653 | - >>> from canonical.launchpad.interfaces import ( |
1654 | - ... ILaunchpadCelebrities, IPersonSet) |
1655 | + >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1656 | + >>> from lp.registry.interfaces.person import IPersonSet |
1657 | >>> from canonical.launchpad.ftests import login, logout |
1658 | >>> login('foo.bar@canonical.com') |
1659 | >>> foo_bar = getUtility(IPersonSet).getByName('name16') |
1660 | |
1661 | === modified file 'lib/lp/archivepublisher/tests/archive-signing.txt' |
1662 | --- lib/lp/archivepublisher/tests/archive-signing.txt 2010-09-02 11:45:19 +0000 |
1663 | +++ lib/lp/archivepublisher/tests/archive-signing.txt 2010-10-20 01:49:43 +0000 |
1664 | @@ -32,8 +32,8 @@ |
1665 | `IArchiveSet.getPPAsPendingSigningKey` allows call-sites to query for |
1666 | PPA pending signing key generation. |
1667 | |
1668 | + >>> from lp.registry.interfaces.person import IPersonSet |
1669 | >>> from lp.soyuz.interfaces.archive import IArchiveSet |
1670 | - >>> from lp.registry.interfaces.person import IPersonSet |
1671 | |
1672 | Only PPAs with at least one source publication are considered. |
1673 | |
1674 | |
1675 | === modified file 'lib/lp/archivepublisher/tests/publishing-meta-data-files.txt' |
1676 | --- lib/lp/archivepublisher/tests/publishing-meta-data-files.txt 2010-08-24 13:47:37 +0000 |
1677 | +++ lib/lp/archivepublisher/tests/publishing-meta-data-files.txt 2010-10-20 01:49:43 +0000 |
1678 | @@ -11,12 +11,12 @@ |
1679 | |
1680 | >>> from canonical.launchpad.interfaces.librarian import ( |
1681 | ... ILibraryFileAliasSet) |
1682 | + >>> from cStringIO import StringIO |
1683 | >>> from lp.archiveuploader.tests import mock_logger |
1684 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
1685 | + >>> from lp.soyuz.enums import PackageUploadCustomFormat |
1686 | >>> from lp.soyuz.interfaces.publishing import PackagePublishingPocket |
1687 | - >>> from lp.soyuz.enums import PackageUploadCustomFormat |
1688 | >>> from lp.soyuz.model.queue import PackageUploadCustom |
1689 | - >>> from cStringIO import StringIO |
1690 | |
1691 | >>> bat = getUtility(IDistributionSet)['ubuntutest']['breezy-autotest'] |
1692 | >>> ppa = factory.makeArchive(distribution=bat.distribution) |
1693 | |
1694 | === modified file 'lib/lp/archiveuploader/tests/nascentupload-announcements.txt' |
1695 | --- lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2010-10-03 15:30:06 +0000 |
1696 | +++ lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2010-10-20 01:49:43 +0000 |
1697 | @@ -52,8 +52,9 @@ |
1698 | distroseries so that we can upload to it. Also adjust 'changeslist' |
1699 | address and allow uploads to universe: |
1700 | |
1701 | - >>> from canonical.launchpad.interfaces import ( |
1702 | - ... SeriesStatus, IDistributionSet, ILibraryFileAliasSet) |
1703 | + >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
1704 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1705 | + >>> from lp.registry.interfaces.series import SeriesStatus |
1706 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1707 | >>> hoary = ubuntu['hoary'] |
1708 | >>> hoary.status = SeriesStatus.DEVELOPMENT |
1709 | @@ -249,10 +250,10 @@ |
1710 | |
1711 | A PPA upload will contain the X-Launchpad-PPA header. |
1712 | |
1713 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1714 | + >>> from lp.registry.interfaces.person import IPersonSet |
1715 | >>> from lp.soyuz.enums import ArchivePurpose |
1716 | >>> from lp.soyuz.interfaces.archive import IArchiveSet |
1717 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
1718 | - >>> from lp.registry.interfaces.person import IPersonSet |
1719 | |
1720 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1721 | >>> name16 = getUtility(IPersonSet).getByName('name16') |
1722 | |
1723 | === modified file 'lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt' |
1724 | --- lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt 2010-10-09 16:36:22 +0000 |
1725 | +++ lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt 2010-10-20 01:49:43 +0000 |
1726 | @@ -32,8 +32,9 @@ |
1727 | |
1728 | >>> from canonical.testing.layers import LaunchpadZopelessLayer |
1729 | >>> from lp.bugs.interfaces.bug import IBugSet |
1730 | - >>> from canonical.launchpad.interfaces import ( |
1731 | - ... IBugTaskSet, IDistributionSet, IPersonSet) |
1732 | + >>> from lp.bugs.interfaces.bugtask import IBugTaskSet |
1733 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1734 | + >>> from lp.registry.interfaces.person import IPersonSet |
1735 | >>> login('no-priv@canonical.com') |
1736 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
1737 | |
1738 | |
1739 | === modified file 'lib/lp/archiveuploader/tests/nascentupload-packageset.txt' |
1740 | --- lib/lp/archiveuploader/tests/nascentupload-packageset.txt 2010-10-09 16:36:22 +0000 |
1741 | +++ lib/lp/archiveuploader/tests/nascentupload-packageset.txt 2010-10-20 01:49:43 +0000 |
1742 | @@ -4,11 +4,12 @@ |
1743 | >>> from lp.archiveuploader.tests import ( |
1744 | ... datadir, getPolicy, mock_logger_quiet) |
1745 | >>> from canonical.database.sqlbase import commit |
1746 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
1747 | + >>> from lp.registry.interfaces.person import IPersonSet |
1748 | + >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
1749 | >>> from lp.soyuz.enums import ArchivePermissionType |
1750 | - >>> from canonical.launchpad.interfaces import ( |
1751 | - ... IArchivePermissionSet, IPackagesetSet, |
1752 | - ... IPersonSet, ISourcePackageNameSet) |
1753 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
1754 | + >>> from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet |
1755 | + >>> from lp.soyuz.interfaces.packageset import IPackagesetSet |
1756 | |
1757 | >>> insecure_policy = getPolicy( |
1758 | ... name='insecure', distro='ubuntu', distroseries='hoary') |
1759 | |
1760 | === modified file 'lib/lp/archiveuploader/tests/nascentupload.txt' |
1761 | --- lib/lp/archiveuploader/tests/nascentupload.txt 2010-10-19 09:00:29 +0000 |
1762 | +++ lib/lp/archiveuploader/tests/nascentupload.txt 2010-10-20 01:49:43 +0000 |
1763 | @@ -12,8 +12,8 @@ |
1764 | For the purpose of this test, hoary needs to be an open (development) |
1765 | distroseries so that we can upload to it. |
1766 | |
1767 | - >>> from canonical.launchpad.interfaces import ( |
1768 | - ... SeriesStatus, IDistributionSet) |
1769 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1770 | + >>> from lp.registry.interfaces.series import SeriesStatus |
1771 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1772 | >>> hoary = ubuntu['hoary'] |
1773 | >>> hoary.status = SeriesStatus.DEVELOPMENT |
1774 | @@ -740,8 +740,8 @@ |
1775 | False |
1776 | |
1777 | >>> from canonical.launchpad.webapp.testing import verifyObject |
1778 | - >>> from canonical.launchpad.interfaces import ( |
1779 | - ... IGPGKey, IPersonSet) |
1780 | + >>> from lp.registry.interfaces.gpg import IGPGKey |
1781 | + >>> from lp.registry.interfaces.person import IPersonSet |
1782 | |
1783 | >>> verifyObject(IGPGKey, bar_ok.changes.dsc.signingkey) |
1784 | True |
1785 | @@ -815,8 +815,8 @@ |
1786 | |
1787 | >>> commit() |
1788 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
1789 | + >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
1790 | >>> from lp.soyuz.enums import ArchivePermissionType |
1791 | - >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
1792 | >>> bar_name = getUtility(ISourcePackageNameSet).getOrCreateByName("bar") |
1793 | >>> discard = ArchivePermission( |
1794 | ... archive=ubuntu.main_archive, person=name16, |
1795 | |
1796 | === modified file 'lib/lp/archiveuploader/tests/upload-karma.txt' |
1797 | --- lib/lp/archiveuploader/tests/upload-karma.txt 2010-10-10 15:39:28 +0000 |
1798 | +++ lib/lp/archiveuploader/tests/upload-karma.txt 2010-10-20 01:49:43 +0000 |
1799 | @@ -49,9 +49,9 @@ |
1800 | |
1801 | Poke the queue entry so it looks like Foo Bar (name16) uploaded it: |
1802 | |
1803 | + >>> from zope.security.proxy import removeSecurityProxy |
1804 | >>> from lp.registry.interfaces.gpg import IGPGKeySet |
1805 | >>> from lp.registry.interfaces.person import IPersonSet |
1806 | - >>> from zope.security.proxy import removeSecurityProxy |
1807 | >>> name16 = getUtility(IPersonSet).getByName('name16') |
1808 | >>> key = getUtility(IGPGKeySet).getGPGKeysForPeople([name16])[0] |
1809 | >>> removeSecurityProxy(foo_src.queue_root).signing_key = key |
1810 | @@ -83,9 +83,9 @@ |
1811 | will generate another different karma event for the uploader. |
1812 | |
1813 | >>> from lp.archiveuploader.tests import getPolicy |
1814 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1815 | >>> from lp.soyuz.enums import ArchivePurpose |
1816 | >>> from lp.soyuz.interfaces.archive import IArchiveSet |
1817 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
1818 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1819 | >>> name16_ppa = getUtility(IArchiveSet).new( |
1820 | ... owner=name16, distribution=ubuntu, purpose=ArchivePurpose.PPA) |
1821 | |
1822 | === modified file 'lib/lp/archiveuploader/tests/uploadpolicy.txt' |
1823 | --- lib/lp/archiveuploader/tests/uploadpolicy.txt 2010-10-06 11:46:51 +0000 |
1824 | +++ lib/lp/archiveuploader/tests/uploadpolicy.txt 2010-10-20 01:49:43 +0000 |
1825 | @@ -78,8 +78,8 @@ |
1826 | approve an upload automatically (I.E. move it straight to ACCEPTED |
1827 | instead of UNAPPROVED) |
1828 | |
1829 | - >>> from canonical.launchpad.interfaces import ( |
1830 | - ... SeriesStatus, IDistributionSet) |
1831 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1832 | + >>> from lp.registry.interfaces.series import SeriesStatus |
1833 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1834 | >>> hoary = ubuntu['hoary'] |
1835 | |
1836 | |
1837 | === modified file 'lib/lp/blueprints/doc/spec-mail-exploder.txt' |
1838 | --- lib/lp/blueprints/doc/spec-mail-exploder.txt 2010-10-12 14:03:44 +0000 |
1839 | +++ lib/lp/blueprints/doc/spec-mail-exploder.txt 2010-10-20 01:49:43 +0000 |
1840 | @@ -268,8 +268,8 @@ |
1841 | ... config.launchpad.specs_domain) |
1842 | >>> moin_change['Sender'] = 'webmaster@ubuntu.com' |
1843 | |
1844 | + >>> from lp.services.mail.incoming import handleMail |
1845 | >>> from lp.services.mail.sendmail import sendmail |
1846 | - >>> from lp.services.mail.incoming import handleMail |
1847 | >>> sendmail(moin_change, bulk=False) |
1848 | '...' |
1849 | |
1850 | |
1851 | === modified file 'lib/lp/blueprints/doc/specgraph.txt' |
1852 | --- lib/lp/blueprints/doc/specgraph.txt 2010-07-30 12:56:27 +0000 |
1853 | +++ lib/lp/blueprints/doc/specgraph.txt 2010-10-20 01:49:43 +0000 |
1854 | @@ -256,8 +256,8 @@ |
1855 | >>> from zope.component import getMultiAdapter |
1856 | >>> from lp.blueprints.browser.specification import ( |
1857 | ... SpecificationTreeImageTag) |
1858 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
1859 | >>> from lp.registry.interfaces.product import IProductSet |
1860 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
1861 | |
1862 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
1863 | >>> svg_support = firefox.getSpecification('svg-support') |
1864 | |
1865 | === modified file 'lib/lp/blueprints/doc/specification-branch.txt' |
1866 | --- lib/lp/blueprints/doc/specification-branch.txt 2010-07-30 12:56:27 +0000 |
1867 | +++ lib/lp/blueprints/doc/specification-branch.txt 2010-10-20 01:49:43 +0000 |
1868 | @@ -14,8 +14,8 @@ |
1869 | >>> from zope.component import getUtility |
1870 | >>> from canonical.launchpad.interfaces.launchpad import ( |
1871 | ... ILaunchpadCelebrities) |
1872 | + >>> from lp.code.interfaces.branchlookup import IBranchLookup |
1873 | >>> from lp.registry.interfaces.person import IPersonSet |
1874 | - >>> from lp.code.interfaces.branchlookup import IBranchLookup |
1875 | |
1876 | >>> ubuntu = getUtility(ILaunchpadCelebrities).ubuntu |
1877 | >>> spec = ubuntu.getSpecification('media-integrity-check') |
1878 | |
1879 | === modified file 'lib/lp/blueprints/doc/specification-notifications.txt' |
1880 | --- lib/lp/blueprints/doc/specification-notifications.txt 2010-07-30 12:56:27 +0000 |
1881 | +++ lib/lp/blueprints/doc/specification-notifications.txt 2010-10-20 01:49:43 +0000 |
1882 | @@ -8,8 +8,8 @@ |
1883 | Changing the status: |
1884 | |
1885 | >>> from zope.component import getMultiAdapter |
1886 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
1887 | >>> from lp.registry.interfaces.product import IProductSet |
1888 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
1889 | |
1890 | >>> login('foo.bar@canonical.com') |
1891 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
1892 | |
1893 | === modified file 'lib/lp/blueprints/doc/specification.txt' |
1894 | --- lib/lp/blueprints/doc/specification.txt 2010-07-30 12:56:27 +0000 |
1895 | +++ lib/lp/blueprints/doc/specification.txt 2010-10-20 01:49:43 +0000 |
1896 | @@ -117,9 +117,9 @@ |
1897 | ISpecification.getDelta(). If there are no changes, None will be |
1898 | returned: |
1899 | |
1900 | + >>> from zope.interface import providedBy |
1901 | + >>> from lazr.lifecycle.snapshot import Snapshot |
1902 | >>> from lp.bugs.interfaces.bug import IBugSet |
1903 | - >>> from lazr.lifecycle.snapshot import Snapshot |
1904 | - >>> from zope.interface import providedBy |
1905 | >>> unmodified_spec = Snapshot(ubuspec, providing=providedBy(ubuspec)) |
1906 | >>> ubuspec.getDelta(unmodified_spec, jdub) is None |
1907 | True |
1908 | |
1909 | === modified file 'lib/lp/blueprints/doc/sprint-agenda.txt' |
1910 | --- lib/lp/blueprints/doc/sprint-agenda.txt 2009-07-24 12:55:03 +0000 |
1911 | +++ lib/lp/blueprints/doc/sprint-agenda.txt 2010-10-20 01:49:43 +0000 |
1912 | @@ -9,8 +9,8 @@ |
1913 | First, lets get hold of some people, a product, a sprint and a spec. |
1914 | |
1915 | >>> from lp.blueprints.model.sprint import SprintSet |
1916 | + >>> from lp.registry.model.person import PersonSet |
1917 | >>> from lp.registry.model.product import ProductSet |
1918 | - >>> from lp.registry.model.person import PersonSet |
1919 | >>> upstream_firefox = ProductSet()['firefox'] |
1920 | >>> canvas = upstream_firefox.getSpecification('canvas') |
1921 | >>> guacamole = SprintSet()['uds-guacamole'] |
1922 | |
1923 | === modified file 'lib/lp/blueprints/doc/sprint-meeting-export.txt' |
1924 | --- lib/lp/blueprints/doc/sprint-meeting-export.txt 2010-07-30 12:56:27 +0000 |
1925 | +++ lib/lp/blueprints/doc/sprint-meeting-export.txt 2010-10-20 01:49:43 +0000 |
1926 | @@ -13,10 +13,10 @@ |
1927 | >>> from pytz import timezone |
1928 | >>> from zope.component import getUtility, getMultiAdapter |
1929 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
1930 | + >>> from lp.blueprints.browser.sprint import SprintMeetingExportView |
1931 | + >>> from lp.blueprints.interfaces.sprint import ISprintSet |
1932 | >>> from lp.registry.interfaces.person import IPersonSet |
1933 | >>> from lp.registry.interfaces.product import IProductSet |
1934 | - >>> from lp.blueprints.interfaces.sprint import ISprintSet |
1935 | - >>> from lp.blueprints.browser.sprint import SprintMeetingExportView |
1936 | |
1937 | Look up a few Launchpad objects to be used in the tests |
1938 | |
1939 | |
1940 | === modified file 'lib/lp/blueprints/doc/sprint.txt' |
1941 | --- lib/lp/blueprints/doc/sprint.txt 2010-07-30 12:56:27 +0000 |
1942 | +++ lib/lp/blueprints/doc/sprint.txt 2010-10-20 01:49:43 +0000 |
1943 | @@ -4,8 +4,8 @@ |
1944 | Sprints or meetings can be coordinated using Launchpad. |
1945 | |
1946 | >>> from zope.component import getUtility |
1947 | + >>> from lp.blueprints.interfaces.sprint import ISprintSet |
1948 | >>> from lp.registry.interfaces.person import IPersonSet |
1949 | - >>> from lp.blueprints.interfaces.sprint import ISprintSet |
1950 | >>> sprintset = getUtility(ISprintSet) |
1951 | |
1952 | To find a sprint by name, use: |
1953 | @@ -15,9 +15,9 @@ |
1954 | The major pillars, product, distribution and project, have some |
1955 | properties which give us the sprints relevant to them. |
1956 | |
1957 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
1958 | >>> from lp.registry.interfaces.product import IProductSet |
1959 | >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet |
1960 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
1961 | |
1962 | >>> productset = getUtility(IProductSet) |
1963 | >>> projectset = getUtility(IProjectGroupSet) |
1964 | @@ -156,8 +156,8 @@ |
1965 | |
1966 | Inactive products are excluded from the listings. |
1967 | |
1968 | - >>> from lp.registry.interfaces.product import IProductSet |
1969 | >>> from canonical.launchpad.ftests import login |
1970 | + >>> from lp.registry.interfaces.product import IProductSet |
1971 | |
1972 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
1973 | >>> login("foo.bar@canonical.com") |
1974 | |
1975 | === modified file 'lib/lp/blueprints/stories/sprints/20-sprint-registration.txt' |
1976 | --- lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2010-07-30 12:56:27 +0000 |
1977 | +++ lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2010-10-20 01:49:43 +0000 |
1978 | @@ -157,9 +157,9 @@ |
1979 | First, we add a couple of IRC nicknames for Carlos. |
1980 | |
1981 | >>> from canonical.launchpad.ftests import login, logout |
1982 | + >>> from zope.component import getUtility |
1983 | >>> from lp.registry.interfaces.person import IPersonSet |
1984 | >>> from lp.registry.model.person import IrcID |
1985 | - >>> from zope.component import getUtility |
1986 | >>> login('carlos@canonical.com') |
1987 | >>> carlos = getUtility(IPersonSet).getByName('carlos') |
1988 | >>> IrcID(person=carlos, network='freenode', nickname='carlos') |
1989 | |
1990 | === modified file 'lib/lp/bugs/browser/tests/bug-nomination-views.txt' |
1991 | --- lib/lp/bugs/browser/tests/bug-nomination-views.txt 2010-10-11 16:17:45 +0000 |
1992 | +++ lib/lp/bugs/browser/tests/bug-nomination-views.txt 2010-10-20 01:49:43 +0000 |
1993 | @@ -7,9 +7,9 @@ |
1994 | |
1995 | >>> from zope.component import getUtility, getMultiAdapter |
1996 | |
1997 | - >>> from lp.bugs.interfaces.bugtask import IBugTaskSet |
1998 | >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag |
1999 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2000 | + >>> from lp.bugs.interfaces.bugtask import IBugTaskSet |
2001 | |
2002 | >>> login("no-priv@canonical.com") |
2003 | |
2004 | |
2005 | === modified file 'lib/lp/bugs/browser/tests/bug-views.txt' |
2006 | --- lib/lp/bugs/browser/tests/bug-views.txt 2010-10-14 18:42:19 +0000 |
2007 | +++ lib/lp/bugs/browser/tests/bug-views.txt 2010-10-20 01:49:43 +0000 |
2008 | @@ -27,10 +27,19 @@ |
2009 | comment, of the bug report. |
2010 | |
2011 | >>> from zope.component import getMultiAdapter, getUtility |
2012 | - >>> from canonical.launchpad.interfaces import ( |
2013 | - ... BugTaskSearchParams, IDistributionSet, IBugSet, IBugTaskSet, |
2014 | - ... ILaunchBag, IOpenLaunchBag, IPersonSet, IProductSet) |
2015 | + >>> from canonical.launchpad.webapp.interfaces import ( |
2016 | + ... ILaunchBag, |
2017 | + ... IOpenLaunchBag, |
2018 | + ... ) |
2019 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2020 | + >>> from lp.bugs.interfaces.bug import IBugSet |
2021 | + >>> from lp.bugs.interfaces.bugtask import ( |
2022 | + ... BugTaskSearchParams, |
2023 | + ... IBugTaskSet, |
2024 | + ... ) |
2025 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2026 | + >>> from lp.registry.interfaces.person import IPersonSet |
2027 | + >>> from lp.registry.interfaces.product import IProductSet |
2028 | |
2029 | >>> launchbag = getUtility(IOpenLaunchBag) |
2030 | >>> login("foo.bar@canonical.com") |
2031 | @@ -444,8 +453,8 @@ |
2032 | returned results, because an approved nomination will have created a |
2033 | task anyway. |
2034 | |
2035 | + >>> from lp.bugs.interfaces.bugnomination import IBugNomination |
2036 | >>> from lp.bugs.interfaces.bugtask import IBugTask |
2037 | - >>> from lp.bugs.interfaces.bugnomination import IBugNomination |
2038 | |
2039 | >>> def get_object_type(task_or_nomination): |
2040 | ... if IBugTask.providedBy(task_or_nomination): |
2041 | |
2042 | === modified file 'lib/lp/bugs/browser/tests/buglinktarget-views.txt' |
2043 | --- lib/lp/bugs/browser/tests/buglinktarget-views.txt 2010-10-03 15:30:06 +0000 |
2044 | +++ lib/lp/bugs/browser/tests/buglinktarget-views.txt 2010-10-20 01:49:43 +0000 |
2045 | @@ -4,9 +4,10 @@ |
2046 | |
2047 | >>> from zope.component import getMultiAdapter |
2048 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2049 | - >>> from canonical.launchpad.interfaces import ( |
2050 | - ... IBugLinkTarget, IBugSet, ICveSet) |
2051 | >>> from lazr.lifecycle.event import ObjectModifiedEvent |
2052 | + >>> from lp.bugs.interfaces.bug import IBugSet |
2053 | + >>> from lp.bugs.interfaces.buglink import IBugLinkTarget |
2054 | + >>> from lp.bugs.interfaces.cve import ICveSet |
2055 | |
2056 | >>> bugset = getUtility(IBugSet) |
2057 | >>> cve = getUtility(ICveSet)['2005-2730'] |
2058 | |
2059 | === modified file 'lib/lp/bugs/browser/tests/bugs-views.txt' |
2060 | --- lib/lp/bugs/browser/tests/bugs-views.txt 2010-10-11 16:17:45 +0000 |
2061 | +++ lib/lp/bugs/browser/tests/bugs-views.txt 2010-10-20 01:49:43 +0000 |
2062 | @@ -4,9 +4,9 @@ |
2063 | doesn't use its context for anything, so we don't have to supply one |
2064 | when creating it. |
2065 | |
2066 | - >>> from lp.bugs.browser.bug import MaloneView |
2067 | >>> from canonical.launchpad.systemhomes import MaloneApplication |
2068 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2069 | + >>> from lp.bugs.browser.bug import MaloneView |
2070 | >>> bugs_view = MaloneView(MaloneApplication(), LaunchpadTestRequest()) |
2071 | >>> bugs_view.initialize() |
2072 | |
2073 | @@ -31,8 +31,8 @@ |
2074 | in the future. |
2075 | |
2076 | >>> login('test@canonical.com') |
2077 | + >>> from canonical.launchpad.ftests import syncUpdate |
2078 | >>> from lp.bugs.interfaces.bug import IBugSet |
2079 | - >>> from canonical.launchpad.ftests import syncUpdate |
2080 | >>> bug_eight = getUtility(IBugSet).get(8) |
2081 | >>> len(bug_eight.bugtasks) |
2082 | 1 |
2083 | |
2084 | === modified file 'lib/lp/bugs/browser/tests/bugtask-adding-views.txt' |
2085 | --- lib/lp/bugs/browser/tests/bugtask-adding-views.txt 2010-10-09 16:36:22 +0000 |
2086 | +++ lib/lp/bugs/browser/tests/bugtask-adding-views.txt 2010-10-20 01:49:43 +0000 |
2087 | @@ -97,8 +97,8 @@ |
2088 | most likely to get added. Let's take a look how it works for packages, |
2089 | which can have packaging links that helps us choose the product. |
2090 | |
2091 | - >>> from canonical.launchpad.interfaces import ( |
2092 | - ... CreateBugParams, IDistributionSet) |
2093 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
2094 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2095 | >>> owner = getUtility(ILaunchBag).user |
2096 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
2097 | >>> ubuntu_firefox = ubuntu.getSourcePackage('mozilla-firefox') |
2098 | @@ -168,8 +168,8 @@ |
2099 | event listener and register it: |
2100 | |
2101 | >>> from zope.interface import Interface |
2102 | + >>> from canonical.launchpad.ftests.event import TestEventListener |
2103 | >>> from lazr.lifecycle.interfaces import IObjectCreatedEvent |
2104 | - >>> from canonical.launchpad.ftests.event import TestEventListener |
2105 | |
2106 | >>> def on_created_event(object, event): |
2107 | ... print "ObjectCreatedEvent: %r" % object |
2108 | |
2109 | === modified file 'lib/lp/bugs/browser/tests/bugtask-edit-views.txt' |
2110 | --- lib/lp/bugs/browser/tests/bugtask-edit-views.txt 2010-10-09 16:36:22 +0000 |
2111 | +++ lib/lp/bugs/browser/tests/bugtask-edit-views.txt 2010-10-20 01:49:43 +0000 |
2112 | @@ -10,8 +10,8 @@ |
2113 | Person: |
2114 | |
2115 | >>> from zope.component import getMultiAdapter |
2116 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2117 | >>> from lp.bugs.interfaces.bug import IBugSet |
2118 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2119 | >>> login('test@canonical.com') |
2120 | >>> bug_nine = getUtility(IBugSet).get(9) |
2121 | >>> ubuntu_thunderbird_task = bug_nine.bugtasks[1] |
2122 | @@ -83,8 +83,8 @@ |
2123 | distribution task already has, an error message will occur. First, |
2124 | let's add an evolution (Ubuntu) task to bug two. |
2125 | |
2126 | - >>> from canonical.launchpad.interfaces import ( |
2127 | - ... IBugTaskSet, IDistributionSet) |
2128 | + >>> from lp.bugs.interfaces.bugtask import IBugTaskSet |
2129 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2130 | >>> bug_two = getUtility(IBugSet).get(2) |
2131 | >>> ubuntu = getUtility(IDistributionSet).getByName("ubuntu") |
2132 | >>> ubuntu_evolution = ubuntu.getSourcePackage('evolution') |
2133 | |
2134 | === modified file 'lib/lp/bugs/browser/tests/bugtask-search-views.txt' |
2135 | --- lib/lp/bugs/browser/tests/bugtask-search-views.txt 2010-10-09 16:36:22 +0000 |
2136 | +++ lib/lp/bugs/browser/tests/bugtask-search-views.txt 2010-10-20 01:49:43 +0000 |
2137 | @@ -3,8 +3,8 @@ |
2138 | In the 'Bugs' facet of a distribution we can find a list of bugs |
2139 | reported in that distribution and simple and advanced search forms. |
2140 | |
2141 | - >>> from canonical.launchpad.interfaces import ( |
2142 | - ... IOpenLaunchBag, IDistributionSet) |
2143 | + >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag |
2144 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2145 | >>> launchbag = getUtility(IOpenLaunchBag) |
2146 | >>> debian = getUtility(IDistributionSet).getByName('debian') |
2147 | |
2148 | @@ -230,8 +230,8 @@ |
2149 | And now we'll change the status of one of the bugtasks, but first we |
2150 | need to be logged in. |
2151 | |
2152 | + >>> from canonical.database.sqlbase import flush_database_updates |
2153 | >>> from canonical.launchpad.ftests import login |
2154 | - >>> from canonical.database.sqlbase import flush_database_updates |
2155 | |
2156 | >>> login("test@canonical.com") |
2157 | |
2158 | |
2159 | === modified file 'lib/lp/bugs/browser/tests/distrosourcepackage-bug-views.txt' |
2160 | --- lib/lp/bugs/browser/tests/distrosourcepackage-bug-views.txt 2010-10-03 15:30:06 +0000 |
2161 | +++ lib/lp/bugs/browser/tests/distrosourcepackage-bug-views.txt 2010-10-20 01:49:43 +0000 |
2162 | @@ -5,9 +5,9 @@ |
2163 | Simple searching is possible on the distro source package bug view page. |
2164 | |
2165 | >>> from zope.component import getMultiAdapter, getUtility |
2166 | - >>> from canonical.launchpad.interfaces import ( |
2167 | - ... IDistributionSet, ISourcePackageNameSet) |
2168 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2169 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2170 | + >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
2171 | |
2172 | >>> debian = getUtility(IDistributionSet).get(3) |
2173 | >>> mozilla_firefox = getUtility(ISourcePackageNameSet).get(1) |
2174 | |
2175 | === modified file 'lib/lp/bugs/browser/tests/person-bug-views.txt' |
2176 | --- lib/lp/bugs/browser/tests/person-bug-views.txt 2010-10-09 16:36:22 +0000 |
2177 | +++ lib/lp/bugs/browser/tests/person-bug-views.txt 2010-10-20 01:49:43 +0000 |
2178 | @@ -87,8 +87,8 @@ |
2179 | Using the advanced form we can also query for closed bugs reported by someone. |
2180 | Let's first close a bug setting its status to 'Invalid'. |
2181 | |
2182 | + >>> from canonical.database.sqlbase import flush_database_updates |
2183 | >>> from canonical.launchpad.ftests import login |
2184 | - >>> from canonical.database.sqlbase import flush_database_updates |
2185 | |
2186 | >>> login("foo.bar@canonical.com") |
2187 | |
2188 | |
2189 | === modified file 'lib/lp/bugs/doc/bug-change.txt' |
2190 | --- lib/lp/bugs/doc/bug-change.txt 2010-10-03 15:30:06 +0000 |
2191 | +++ lib/lp/bugs/doc/bug-change.txt 2010-10-20 01:49:43 +0000 |
2192 | @@ -3,10 +3,10 @@ |
2193 | The base class for BugChanges doesn't actually implement anything. |
2194 | |
2195 | >>> import pytz |
2196 | + >>> from canonical.launchpad.webapp.testing import verifyObject |
2197 | >>> from datetime import datetime |
2198 | >>> from lp.bugs.adapters.bugchange import BugChangeBase |
2199 | >>> from lp.bugs.interfaces.bugchange import IBugChange |
2200 | - >>> from canonical.launchpad.webapp.testing import verifyObject |
2201 | |
2202 | >>> from lp.testing.factory import LaunchpadObjectFactory |
2203 | >>> factory = LaunchpadObjectFactory() |
2204 | |
2205 | === modified file 'lib/lp/bugs/doc/bug-export.txt' |
2206 | --- lib/lp/bugs/doc/bug-export.txt 2010-10-03 15:30:06 +0000 |
2207 | +++ lib/lp/bugs/doc/bug-export.txt 2010-10-20 01:49:43 +0000 |
2208 | @@ -23,10 +23,11 @@ |
2209 | ... import xml.etree.cElementTree as ET |
2210 | ... except ImportError: |
2211 | ... import cElementTree as ET |
2212 | + >>> from zope.component import getUtility |
2213 | >>> from cStringIO import StringIO |
2214 | - >>> from zope.component import getUtility |
2215 | - >>> from canonical.launchpad.interfaces import ( |
2216 | - ... IBugSet, IPersonSet, IProductSet) |
2217 | + >>> from lp.bugs.interfaces.bug import IBugSet |
2218 | + >>> from lp.registry.interfaces.person import IPersonSet |
2219 | + >>> from lp.registry.interfaces.product import IProductSet |
2220 | >>> from lp.bugs.scripts.bugexport import ( |
2221 | ... serialise_bugtask, export_bugtasks) |
2222 | |
2223 | |
2224 | === modified file 'lib/lp/bugs/doc/bug-nomination.txt' |
2225 | --- lib/lp/bugs/doc/bug-nomination.txt 2010-10-09 16:36:22 +0000 |
2226 | +++ lib/lp/bugs/doc/bug-nomination.txt 2010-10-20 01:49:43 +0000 |
2227 | @@ -6,9 +6,9 @@ |
2228 | |
2229 | >>> from zope.component import getUtility |
2230 | >>> from zope.interface.verify import verifyClass |
2231 | - >>> from lp.bugs.model.bugnomination import BugNomination |
2232 | >>> from lp.bugs.interfaces.bug import IBugSet |
2233 | >>> from lp.bugs.interfaces.bugnomination import IBugNomination |
2234 | + >>> from lp.bugs.model.bugnomination import BugNomination |
2235 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
2236 | >>> from lp.registry.interfaces.person import IPersonSet |
2237 | |
2238 | |
2239 | === modified file 'lib/lp/bugs/doc/bug-private-by-default.txt' |
2240 | --- lib/lp/bugs/doc/bug-private-by-default.txt 2010-10-04 19:50:45 +0000 |
2241 | +++ lib/lp/bugs/doc/bug-private-by-default.txt 2010-10-20 01:49:43 +0000 |
2242 | @@ -4,8 +4,9 @@ |
2243 | (this is enforced by a DB constraint). |
2244 | |
2245 | >>> from canonical.testing.layers import LaunchpadZopelessLayer |
2246 | - >>> from canonical.launchpad.interfaces import ( |
2247 | - ... IPersonSet, CreateBugParams, IProductSet) |
2248 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
2249 | + >>> from lp.registry.interfaces.person import IPersonSet |
2250 | + >>> from lp.registry.interfaces.product import IProductSet |
2251 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
2252 | >>> no_priv = getUtility(IPersonSet).getByName('no-priv') |
2253 | >>> name16 = getUtility(IPersonSet).get(16) |
2254 | |
2255 | === modified file 'lib/lp/bugs/doc/bug-reported-acknowledgement.txt' |
2256 | --- lib/lp/bugs/doc/bug-reported-acknowledgement.txt 2010-10-09 16:36:22 +0000 |
2257 | +++ lib/lp/bugs/doc/bug-reported-acknowledgement.txt 2010-10-20 01:49:43 +0000 |
2258 | @@ -7,8 +7,9 @@ |
2259 | |
2260 | >>> login('foo.bar@canonical.com') |
2261 | |
2262 | - >>> from canonical.launchpad.interfaces import ( |
2263 | - ... IDistributionSet, IProjectGroupSet, IProductSet) |
2264 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2265 | + >>> from lp.registry.interfaces.product import IProductSet |
2266 | + >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet |
2267 | |
2268 | >>> distribution = getUtility(IDistributionSet).getByName('ubuntu') |
2269 | >>> distribution_source_package = ( |
2270 | |
2271 | === modified file 'lib/lp/bugs/doc/bug-reporting-guidelines.txt' |
2272 | --- lib/lp/bugs/doc/bug-reporting-guidelines.txt 2010-10-09 16:36:22 +0000 |
2273 | +++ lib/lp/bugs/doc/bug-reporting-guidelines.txt 2010-10-20 01:49:43 +0000 |
2274 | @@ -6,8 +6,9 @@ |
2275 | |
2276 | >>> login('foo.bar@canonical.com') |
2277 | |
2278 | - >>> from canonical.launchpad.interfaces import ( |
2279 | - ... IDistributionSet, IProjectGroupSet, IProductSet) |
2280 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2281 | + >>> from lp.registry.interfaces.product import IProductSet |
2282 | + >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet |
2283 | |
2284 | >>> distribution = getUtility(IDistributionSet).getByName('ubuntu') |
2285 | >>> distribution_source_package = ( |
2286 | |
2287 | === modified file 'lib/lp/bugs/doc/bug-set-status.txt' |
2288 | --- lib/lp/bugs/doc/bug-set-status.txt 2010-10-09 16:36:22 +0000 |
2289 | +++ lib/lp/bugs/doc/bug-set-status.txt 2010-10-20 01:49:43 +0000 |
2290 | @@ -10,9 +10,9 @@ |
2291 | >>> login('no-priv@canonical.com') |
2292 | >>> no_priv = getUtility(IPersonSet).getByName('no-priv') |
2293 | |
2294 | - >>> from canonical.launchpad.interfaces import ( |
2295 | - ... CreateBugParams, IProductSet) |
2296 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
2297 | >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
2298 | + >>> from lp.registry.interfaces.product import IProductSet |
2299 | >>> bug_params = CreateBugParams( |
2300 | ... owner=no_priv, title='Sample bug', comment='This is a sample bug.') |
2301 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
2302 | |
2303 | === modified file 'lib/lp/bugs/doc/bug-tags.txt' |
2304 | --- lib/lp/bugs/doc/bug-tags.txt 2010-10-11 16:17:45 +0000 |
2305 | +++ lib/lp/bugs/doc/bug-tags.txt 2010-10-20 01:49:43 +0000 |
2306 | @@ -67,9 +67,9 @@ |
2307 | To make it easy editing the tags as a space separated text string, we |
2308 | use BugTagsWidget. |
2309 | |
2310 | - >>> from lp.bugs.interfaces.bug import IBug |
2311 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2312 | >>> from canonical.widgets.bug import BugTagsWidget |
2313 | + >>> from lp.bugs.interfaces.bug import IBug |
2314 | >>> bug_tags_field = IBug['tags'].bind(bug_one) |
2315 | >>> tag_field = bug_tags_field.value_type |
2316 | >>> request = LaunchpadTestRequest() |
2317 | @@ -178,9 +178,9 @@ |
2318 | |
2319 | We can search for bugs with some specific tag. |
2320 | |
2321 | - >>> from canonical.launchpad.interfaces import ( |
2322 | - ... BugTaskSearchParams, IDistributionSet) |
2323 | >>> from canonical.launchpad.searchbuilder import all |
2324 | + >>> from lp.bugs.interfaces.bugtask import BugTaskSearchParams |
2325 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2326 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
2327 | >>> svg_tasks = ubuntu.searchTasks( |
2328 | ... BugTaskSearchParams(tag=all(u'svg'), user=None)) |
2329 | |
2330 | === modified file 'lib/lp/bugs/doc/bug.txt' |
2331 | --- lib/lp/bugs/doc/bug.txt 2010-08-30 05:19:46 +0000 |
2332 | +++ lib/lp/bugs/doc/bug.txt 2010-10-20 01:49:43 +0000 |
2333 | @@ -313,8 +313,8 @@ |
2334 | Note that a search will return all public bugs, omitting bug 14 which is |
2335 | private: |
2336 | |
2337 | + >>> from canonical.launchpad.interfaces.lpstorm import IStore |
2338 | >>> from lp.bugs.model.bug import Bug |
2339 | - >>> from canonical.launchpad.interfaces.lpstorm import IStore |
2340 | >>> all_bugs = set(IStore(Bug).find(Bug).values(Bug.id)) |
2341 | |
2342 | >>> def hidden_bugs(): |
2343 | |
2344 | === modified file 'lib/lp/bugs/doc/bugactivity.txt' |
2345 | --- lib/lp/bugs/doc/bugactivity.txt 2010-10-09 16:36:22 +0000 |
2346 | +++ lib/lp/bugs/doc/bugactivity.txt 2010-10-20 01:49:43 +0000 |
2347 | @@ -22,9 +22,13 @@ |
2348 | >>> from zope.event import notify |
2349 | >>> from lazr.lifecycle.event import ( |
2350 | ... ObjectCreatedEvent, ObjectModifiedEvent) |
2351 | - >>> from canonical.launchpad.interfaces import ( |
2352 | - ... IUpstreamBugTask, IDistroBugTask, IProductSet, IBugTaskSet) |
2353 | >>> from lazr.lifecycle.snapshot import Snapshot |
2354 | + >>> from lp.bugs.interfaces.bugtask import ( |
2355 | + ... IBugTaskSet, |
2356 | + ... IDistroBugTask, |
2357 | + ... IUpstreamBugTask, |
2358 | + ... ) |
2359 | + >>> from lp.registry.interfaces.product import IProductSet |
2360 | >>> user = getUtility(ILaunchBag).user |
2361 | |
2362 | |
2363 | @@ -67,8 +71,8 @@ |
2364 | |
2365 | >>> from lazr.lifecycle.snapshot import Snapshot |
2366 | >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
2367 | - >>> from canonical.launchpad.interfaces import ( |
2368 | - ... ISourcePackageNameSet, IDistributionSet) |
2369 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2370 | + >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
2371 | >>> mozilla_firefox = getUtility(ISourcePackageNameSet)['mozilla-firefox'] |
2372 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
2373 | >>> source_package_assignment = getUtility(IBugTaskSet).createTask( |
2374 | |
2375 | === modified file 'lib/lp/bugs/doc/bugattachments.txt' |
2376 | --- lib/lp/bugs/doc/bugattachments.txt 2010-10-03 15:30:06 +0000 |
2377 | +++ lib/lp/bugs/doc/bugattachments.txt 2010-10-20 01:49:43 +0000 |
2378 | @@ -10,8 +10,10 @@ |
2379 | >>> from canonical.launchpad.ftests import login |
2380 | >>> login("foo.bar@canonical.com") |
2381 | |
2382 | - >>> from canonical.launchpad.interfaces import ( |
2383 | - ... IBugAttachment, IBugSet, IMessageSet, IPersonSet) |
2384 | + >>> from canonical.launchpad.interfaces.message import IMessageSet |
2385 | + >>> from lp.bugs.interfaces.bug import IBugSet |
2386 | + >>> from lp.bugs.interfaces.bugattachment import IBugAttachment |
2387 | + >>> from lp.registry.interfaces.person import IPersonSet |
2388 | >>> bugset = getUtility(IBugSet) |
2389 | >>> bug_one = bugset.get(1) |
2390 | >>> bug_one.attachments.count() |
2391 | @@ -382,8 +384,11 @@ |
2392 | |
2393 | We can search for attachment of a specific types: |
2394 | |
2395 | - >>> from canonical.launchpad.interfaces import ( |
2396 | - ... BugAttachmentType, BugTaskSearchParams, IBugTaskSet) |
2397 | + >>> from lp.bugs.interfaces.bugattachment import BugAttachmentType |
2398 | + >>> from lp.bugs.interfaces.bugtask import ( |
2399 | + ... BugTaskSearchParams, |
2400 | + ... IBugTaskSet, |
2401 | + ... ) |
2402 | >>> bugtaskset = getUtility(IBugTaskSet) |
2403 | >>> attachmenttype = BugAttachmentType.UNSPECIFIED |
2404 | >>> params = BugTaskSearchParams(attachmenttype=attachmenttype, user=None) |
2405 | |
2406 | === modified file 'lib/lp/bugs/doc/bugcomment.txt' |
2407 | --- lib/lp/bugs/doc/bugcomment.txt 2010-10-14 18:42:19 +0000 |
2408 | +++ lib/lp/bugs/doc/bugcomment.txt 2010-10-20 01:49:43 +0000 |
2409 | @@ -5,8 +5,8 @@ |
2410 | independently. |
2411 | |
2412 | >>> from zope.component import getMultiAdapter |
2413 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2414 | >>> from lp.bugs.interfaces.bug import IBugSet |
2415 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2416 | |
2417 | |
2418 | == Handling of the bug's first comment == |
2419 | |
2420 | === modified file 'lib/lp/bugs/doc/bugmessage-visibility.txt' |
2421 | --- lib/lp/bugs/doc/bugmessage-visibility.txt 2010-10-09 16:36:22 +0000 |
2422 | +++ lib/lp/bugs/doc/bugmessage-visibility.txt 2010-10-20 01:49:43 +0000 |
2423 | @@ -6,8 +6,8 @@ |
2424 | A bug message has a visible field, which is True by default. |
2425 | |
2426 | # Setup for creating a new message |
2427 | + >>> from lp.bugs.interfaces.bug import IBugSet |
2428 | >>> from lp.bugs.interfaces.bugmessage import IBugMessageSet |
2429 | - >>> from lp.bugs.interfaces.bug import IBugSet |
2430 | >>> from lp.registry.interfaces.person import IPersonSet |
2431 | |
2432 | >>> bugmessageset = getUtility(IBugMessageSet) |
2433 | |
2434 | === modified file 'lib/lp/bugs/doc/bugnotification-email.txt' |
2435 | --- lib/lp/bugs/doc/bugnotification-email.txt 2010-10-09 16:36:22 +0000 |
2436 | +++ lib/lp/bugs/doc/bugnotification-email.txt 2010-10-20 01:49:43 +0000 |
2437 | @@ -28,9 +28,13 @@ |
2438 | examples that follow: |
2439 | |
2440 | >>> from zope.component import getUtility |
2441 | - >>> from canonical.launchpad.interfaces import ( |
2442 | - ... IBugDelta, IBugSet, IEmailAddressSet, IPersonSet) |
2443 | + >>> from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet |
2444 | >>> from lp.bugs.adapters.bugdelta import BugDelta |
2445 | + >>> from lp.bugs.interfaces.bug import ( |
2446 | + ... IBugDelta, |
2447 | + ... IBugSet, |
2448 | + ... ) |
2449 | + >>> from lp.registry.interfaces.person import IPersonSet |
2450 | |
2451 | = Filing a bug = |
2452 | |
2453 | @@ -280,10 +284,13 @@ |
2454 | |
2455 | We use a BugTaskDelta to represent changes to a BugTask. |
2456 | |
2457 | - >>> from canonical.launchpad.interfaces import ( |
2458 | - ... BugTaskStatus, IBugTaskDelta, IBugTaskSet) |
2459 | + >>> from canonical.launchpad.webapp.testing import verifyObject |
2460 | + >>> from lp.bugs.interfaces.bugtask import ( |
2461 | + ... BugTaskStatus, |
2462 | + ... IBugTaskDelta, |
2463 | + ... IBugTaskSet, |
2464 | + ... ) |
2465 | >>> from lp.bugs.model.bugtask import BugTaskDelta |
2466 | - >>> from canonical.launchpad.webapp.testing import verifyObject |
2467 | >>> example_bug_task = factory.makeBugTask() |
2468 | >>> example_delta = BugTaskDelta(example_bug_task) |
2469 | >>> verifyObject(IBugTaskDelta, example_delta) |
2470 | |
2471 | === modified file 'lib/lp/bugs/doc/bugnotification-sending.txt' |
2472 | --- lib/lp/bugs/doc/bugnotification-sending.txt 2010-10-11 16:17:45 +0000 |
2473 | +++ lib/lp/bugs/doc/bugnotification-sending.txt 2010-10-20 01:49:43 +0000 |
2474 | @@ -54,8 +54,8 @@ |
2475 | Anyway, let's start our demonstration by adding a comment to a bug: |
2476 | |
2477 | >>> login('test@canonical.com') |
2478 | + >>> from canonical.launchpad.interfaces.message import IMessageSet |
2479 | >>> from lp.bugs.interfaces.bug import IBugSet |
2480 | - >>> from canonical.launchpad.interfaces.message import IMessageSet |
2481 | >>> bug_one = getUtility(IBugSet).get(1) |
2482 | >>> sample_person = getUtility(ILaunchBag).user |
2483 | >>> comment = getUtility(IMessageSet).fromText( |
2484 | @@ -374,8 +374,8 @@ |
2485 | |
2486 | We will also need a fresh new bug. |
2487 | |
2488 | - >>> from canonical.launchpad.interfaces import ( |
2489 | - ... IDistributionSet, CreateBugParams) |
2490 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
2491 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2492 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
2493 | >>> description = getUtility(IMessageSet).fromText( |
2494 | ... 'subject', 'a description of the bug.', sample_person, |
2495 | |
2496 | === modified file 'lib/lp/bugs/doc/bugnotification-threading.txt' |
2497 | --- lib/lp/bugs/doc/bugnotification-threading.txt 2010-10-11 16:17:45 +0000 |
2498 | +++ lib/lp/bugs/doc/bugnotification-threading.txt 2010-10-20 01:49:43 +0000 |
2499 | @@ -9,8 +9,8 @@ |
2500 | |
2501 | Let's add add change notification and see how it works: |
2502 | |
2503 | + >>> from canonical.database.sqlbase import flush_database_updates |
2504 | >>> from canonical.launchpad.database import MessageSet |
2505 | - >>> from canonical.database.sqlbase import flush_database_updates |
2506 | |
2507 | >>> login('test@canonical.com') |
2508 | |
2509 | |
2510 | === modified file 'lib/lp/bugs/doc/bugnotificationrecipients.txt' |
2511 | --- lib/lp/bugs/doc/bugnotificationrecipients.txt 2010-10-09 16:36:22 +0000 |
2512 | +++ lib/lp/bugs/doc/bugnotificationrecipients.txt 2010-10-20 01:49:43 +0000 |
2513 | @@ -11,16 +11,16 @@ |
2514 | action: |
2515 | |
2516 | >>> from lp.bugs.model.bug import Bug |
2517 | + >>> from lp.registry.model.distribution import Distribution |
2518 | >>> from lp.registry.model.product import Product |
2519 | - >>> from lp.registry.model.distribution import Distribution |
2520 | >>> bug_one = Bug.get(1) |
2521 | >>> recipients = bug_one.getBugNotificationRecipients() |
2522 | |
2523 | The instance of BugNotificationRecipients we get back correctly |
2524 | implements INotificationRecipientSet: |
2525 | |
2526 | + >>> from canonical.launchpad.interfaces.launchpad import INotificationRecipientSet |
2527 | >>> from canonical.launchpad.webapp.testing import verifyObject |
2528 | - >>> from canonical.launchpad.interfaces.launchpad import INotificationRecipientSet |
2529 | >>> verifyObject(INotificationRecipientSet, recipients) |
2530 | True |
2531 | |
2532 | |
2533 | === modified file 'lib/lp/bugs/doc/bugnotifications.txt' |
2534 | --- lib/lp/bugs/doc/bugnotifications.txt 2010-10-10 15:39:28 +0000 |
2535 | +++ lib/lp/bugs/doc/bugnotifications.txt 2010-10-20 01:49:43 +0000 |
2536 | @@ -26,9 +26,12 @@ |
2537 | >>> from zope.event import notify |
2538 | >>> from lazr.lifecycle.event import ( |
2539 | ... ObjectModifiedEvent, ObjectCreatedEvent) |
2540 | - >>> from canonical.launchpad.interfaces import ( |
2541 | - ... CreateBugParams, IDistributionSet, IDistroSeriesSet, IPersonSet, |
2542 | - ... IProductSet, ISourcePackageNameSet) |
2543 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
2544 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2545 | + >>> from lp.registry.interfaces.distroseries import IDistroSeriesSet |
2546 | + >>> from lp.registry.interfaces.person import IPersonSet |
2547 | + >>> from lp.registry.interfaces.product import IProductSet |
2548 | + >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
2549 | |
2550 | >>> bug_submitter = getUtility(IPersonSet).get(12) |
2551 | >>> firefox = getUtility(IProductSet).get(4) |
2552 | @@ -51,8 +54,8 @@ |
2553 | |
2554 | === Editing a bug report === |
2555 | |
2556 | + >>> from lazr.lifecycle.snapshot import Snapshot |
2557 | >>> from lp.bugs.interfaces.bug import IBug |
2558 | - >>> from lazr.lifecycle.snapshot import Snapshot |
2559 | >>> bug_before_modification = Snapshot(firefox_crashes, providing=IBug) |
2560 | >>> firefox_crashes.description = "a new description" |
2561 | >>> firefox_crashes_modified = ObjectModifiedEvent( |
2562 | @@ -207,9 +210,11 @@ |
2563 | Let's demonstrate a notification email where Sample Person marks a |
2564 | task Fixed, and assigns himself to it. |
2565 | |
2566 | - >>> from canonical.launchpad.interfaces import ( |
2567 | - ... BugTaskStatus, IDistroBugTask) |
2568 | >>> from lazr.lifecycle.snapshot import Snapshot |
2569 | + >>> from lp.bugs.interfaces.bugtask import ( |
2570 | + ... BugTaskStatus, |
2571 | + ... IDistroBugTask, |
2572 | + ... ) |
2573 | |
2574 | >>> bugtask_before_modification = Snapshot( |
2575 | ... firefox_crashes_in_debian, providing=IDistroBugTask) |
2576 | |
2577 | === modified file 'lib/lp/bugs/doc/bugsubscription.txt' |
2578 | --- lib/lp/bugs/doc/bugsubscription.txt 2010-10-15 14:26:57 +0000 |
2579 | +++ lib/lp/bugs/doc/bugsubscription.txt 2010-10-20 01:49:43 +0000 |
2580 | @@ -12,8 +12,8 @@ |
2581 | |
2582 | IBug has a subscriptions attribute: |
2583 | |
2584 | + >>> from zope.component import getUtility |
2585 | >>> from lp.bugs.interfaces.bug import IBugSet |
2586 | - >>> from zope.component import getUtility |
2587 | >>> bugset = getUtility(IBugSet) |
2588 | >>> bug = bugset.get(1) |
2589 | >>> bug.subscriptions.count() |
2590 | @@ -43,8 +43,10 @@ |
2591 | Let's create a new bug to demonstrate how direct and indirect |
2592 | subscriptions work. |
2593 | |
2594 | - >>> from canonical.launchpad.interfaces import ( |
2595 | - ... IDistributionSet, ILaunchBag, IPersonSet, CreateBugParams) |
2596 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
2597 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
2598 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2599 | + >>> from lp.registry.interfaces.person import IPersonSet |
2600 | >>> ubuntu = getUtility(IDistributionSet).getByName("ubuntu") |
2601 | >>> personset = getUtility(IPersonSet) |
2602 | |
2603 | |
2604 | === modified file 'lib/lp/bugs/doc/bugtarget.txt' |
2605 | --- lib/lp/bugs/doc/bugtarget.txt 2010-10-03 15:30:06 +0000 |
2606 | +++ lib/lp/bugs/doc/bugtarget.txt 2010-10-20 01:49:43 +0000 |
2607 | @@ -12,8 +12,9 @@ |
2608 | target (such as in filterable e-mail messages). |
2609 | |
2610 | >>> from zope.component import getUtility |
2611 | - >>> from canonical.launchpad.interfaces import ( |
2612 | - ... IBugTarget, IDistributionSet, IProductSet) |
2613 | + >>> from lp.bugs.interfaces.bugtarget import IBugTarget |
2614 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2615 | + >>> from lp.registry.interfaces.product import IProductSet |
2616 | >>> distroset = getUtility(IDistributionSet) |
2617 | >>> debian = distroset.getByName("debian") |
2618 | >>> debian_firefox = debian.getSourcePackage("mozilla-firefox") |
2619 | |
2620 | === modified file 'lib/lp/bugs/doc/bugtask-bugwatch-widget.txt' |
2621 | --- lib/lp/bugs/doc/bugtask-bugwatch-widget.txt 2010-10-09 16:36:22 +0000 |
2622 | +++ lib/lp/bugs/doc/bugtask-bugwatch-widget.txt 2010-10-20 01:49:43 +0000 |
2623 | @@ -19,8 +19,8 @@ |
2624 | |
2625 | Now we can create a widget using a test request: |
2626 | |
2627 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2628 | >>> from canonical.widgets.bugtask import BugTaskBugWatchWidget |
2629 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2630 | >>> request = LaunchpadTestRequest() |
2631 | >>> bugwatch_widget = BugTaskBugWatchWidget( |
2632 | ... bugwatch_field, bugwatch_field.vocabulary, request) |
2633 | |
2634 | === modified file 'lib/lp/bugs/doc/bugtask-expiration.txt' |
2635 | --- lib/lp/bugs/doc/bugtask-expiration.txt 2010-10-09 16:36:22 +0000 |
2636 | +++ lib/lp/bugs/doc/bugtask-expiration.txt 2010-10-20 01:49:43 +0000 |
2637 | @@ -31,9 +31,11 @@ |
2638 | (min_days_old) that the bugtask has been in the unattended Incomplete |
2639 | status. It also requires specifying the user that is doing the search. |
2640 | |
2641 | + >>> from lp.bugs.interfaces.bugtask import ( |
2642 | + ... BugTaskStatus, |
2643 | + ... IBugTaskSet, |
2644 | + ... ) |
2645 | >>> from storm.store import Store |
2646 | - >>> from canonical.launchpad.interfaces import ( |
2647 | - ... BugTaskStatus, IBugTaskSet) |
2648 | >>> bugtaskset = getUtility(IBugTaskSet) |
2649 | |
2650 | >>> expirable_bugtasks = bugtaskset.findExpirableBugTasks() |
2651 | @@ -64,8 +66,9 @@ |
2652 | can_expire avoid an expensive db, in the case where we can easily tell |
2653 | that no bug tasks can be expired. |
2654 | |
2655 | - >>> from canonical.launchpad.interfaces import ( |
2656 | - ... IDistributionSet, IPersonSet, IProductSet) |
2657 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2658 | + >>> from lp.registry.interfaces.person import IPersonSet |
2659 | + >>> from lp.registry.interfaces.product import IProductSet |
2660 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
2661 | >>> jokosher = getUtility(IProductSet).getByName('jokosher') |
2662 | >>> sample_person = getUtility(IPersonSet).getByEmail( |
2663 | |
2664 | === modified file 'lib/lp/bugs/doc/bugtask-find-similar.txt' |
2665 | --- lib/lp/bugs/doc/bugtask-find-similar.txt 2010-10-09 16:36:22 +0000 |
2666 | +++ lib/lp/bugs/doc/bugtask-find-similar.txt 2010-10-20 01:49:43 +0000 |
2667 | @@ -11,8 +11,9 @@ |
2668 | It doesn't make much sense to find bugs similar to an empty string, so |
2669 | no results will be returned. |
2670 | |
2671 | - >>> from canonical.launchpad.interfaces import ( |
2672 | - ... IBugTaskSet, IPersonSet, IProductSet) |
2673 | + >>> from lp.bugs.interfaces.bugtask import IBugTaskSet |
2674 | + >>> from lp.registry.interfaces.person import IPersonSet |
2675 | + >>> from lp.registry.interfaces.product import IProductSet |
2676 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
2677 | >>> sample_person = getUtility(IPersonSet).getByEmail('test@canonical.com') |
2678 | >>> similar_bugs = getUtility(IBugTaskSet).findSimilar( |
2679 | @@ -80,8 +81,8 @@ |
2680 | the Firefox bug to private, and repeat the search as a user who isn't |
2681 | allowed to view it, only the Thunderbird bug will be returned this time. |
2682 | |
2683 | + >>> from canonical.launchpad.ftests import syncUpdate |
2684 | >>> from lp.bugs.interfaces.bug import IBugSet |
2685 | - >>> from canonical.launchpad.ftests import syncUpdate |
2686 | >>> login('test@canonical.com') |
2687 | >>> firefox_svg_bug = getUtility(IBugSet).get(1) |
2688 | >>> firefox_svg_bug.setPrivate(True, getUtility(ILaunchBag).user) |
2689 | |
2690 | === modified file 'lib/lp/bugs/doc/bugtask-package-widget.txt' |
2691 | --- lib/lp/bugs/doc/bugtask-package-widget.txt 2010-10-10 15:39:28 +0000 |
2692 | +++ lib/lp/bugs/doc/bugtask-package-widget.txt 2010-10-20 01:49:43 +0000 |
2693 | @@ -12,9 +12,9 @@ |
2694 | to map the package names, we need a distribution, so we give the widget |
2695 | a distribution task to work with. |
2696 | |
2697 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2698 | >>> from lp.bugs.interfaces.bug import IBugSet |
2699 | >>> from lp.bugs.interfaces.bugtask import IDistroBugTask |
2700 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2701 | >>> bug_one = getUtility(IBugSet).get(1) |
2702 | >>> ubuntu_task = bug_one.bugtasks[-2] |
2703 | >>> ubuntu_task.distribution.name |
2704 | |
2705 | === modified file 'lib/lp/bugs/doc/bugtask-retrieval.txt' |
2706 | --- lib/lp/bugs/doc/bugtask-retrieval.txt 2010-10-03 15:30:06 +0000 |
2707 | +++ lib/lp/bugs/doc/bugtask-retrieval.txt 2010-10-20 01:49:43 +0000 |
2708 | @@ -5,9 +5,11 @@ |
2709 | implementation of IBugTaskSet, allowing retrieval of any bug task in |
2710 | Launchpad. We'll use this implementation for demonstration purposes: |
2711 | |
2712 | - >>> from canonical.launchpad.interfaces import ( |
2713 | - ... IBugTask, IBugTaskSet) |
2714 | >>> from lp.app.errors import NotFoundError |
2715 | + >>> from lp.bugs.interfaces.bugtask import ( |
2716 | + ... IBugTask, |
2717 | + ... IBugTaskSet, |
2718 | + ... ) |
2719 | >>> task_set = getUtility(IBugTaskSet) |
2720 | |
2721 | |
2722 | |
2723 | === modified file 'lib/lp/bugs/doc/bugtask-search.txt' |
2724 | --- lib/lp/bugs/doc/bugtask-search.txt 2010-10-09 16:36:22 +0000 |
2725 | +++ lib/lp/bugs/doc/bugtask-search.txt 2010-10-20 01:49:43 +0000 |
2726 | @@ -4,8 +4,10 @@ |
2727 | method, but they all delegate the search to IBugTaskSet.search(). That |
2728 | method accepts a single parameter; an BugTaskSearchParams instance. |
2729 | |
2730 | - >>> from canonical.launchpad.interfaces import ( |
2731 | - ... BugTaskSearchParams, IBugTaskSet) |
2732 | + >>> from lp.bugs.interfaces.bugtask import ( |
2733 | + ... BugTaskSearchParams, |
2734 | + ... IBugTaskSet, |
2735 | + ... ) |
2736 | >>> bugtask_set = getUtility(IBugTaskSet) |
2737 | >>> all_public = BugTaskSearchParams(user=None) |
2738 | >>> found_bugtasks = bugtask_set.search(all_public) |
2739 | @@ -293,8 +295,10 @@ |
2740 | |
2741 | Add an Ubuntu bugtask for a bug that is confirmed upstream. |
2742 | |
2743 | - >>> from canonical.launchpad.interfaces import ( |
2744 | - ... BugTaskImportance, BugTaskStatus) |
2745 | + >>> from lp.bugs.interfaces.bugtask import ( |
2746 | + ... BugTaskImportance, |
2747 | + ... BugTaskStatus, |
2748 | + ... ) |
2749 | >>> from lp.bugs.tests.test_bugtask_1 import ( |
2750 | ... BugTaskSearchBugsElsewhereTest) |
2751 | >>> def bugTaskInfo(bugtask): |
2752 | @@ -736,9 +740,12 @@ |
2753 | It's possible to search for bugs with an attachment of a certain type. |
2754 | |
2755 | >>> from StringIO import StringIO |
2756 | - >>> from canonical.launchpad.interfaces import ( |
2757 | - ... BugAttachmentType, IBugAttachmentSet, ILibraryFileAliasSet, |
2758 | - ... IMessageSet) |
2759 | + >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
2760 | + >>> from canonical.launchpad.interfaces.message import IMessageSet |
2761 | + >>> from lp.bugs.interfaces.bugattachment import ( |
2762 | + ... BugAttachmentType, |
2763 | + ... IBugAttachmentSet, |
2764 | + ... ) |
2765 | >>> product = factory.makeProduct() |
2766 | >>> patch_bug = factory.makeBug( |
2767 | ... product=product) |
2768 | |
2769 | === modified file 'lib/lp/bugs/doc/bugtask-status-workflow.txt' |
2770 | --- lib/lp/bugs/doc/bugtask-status-workflow.txt 2010-10-09 16:36:22 +0000 |
2771 | +++ lib/lp/bugs/doc/bugtask-status-workflow.txt 2010-10-20 01:49:43 +0000 |
2772 | @@ -11,8 +11,9 @@ |
2773 | a new bug to work with: |
2774 | |
2775 | >>> from zope.component import getUtility |
2776 | - >>> from canonical.launchpad.interfaces import ( |
2777 | - ... IDistributionSet, ILaunchBag, CreateBugParams) |
2778 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
2779 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
2780 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2781 | |
2782 | >>> login("foo.bar@canonical.com") |
2783 | >>> foobar = getUtility(ILaunchBag).user |
2784 | |
2785 | === modified file 'lib/lp/bugs/doc/bugtask.txt' |
2786 | --- lib/lp/bugs/doc/bugtask.txt 2010-10-10 15:39:28 +0000 |
2787 | +++ lib/lp/bugs/doc/bugtask.txt 2010-10-20 01:49:43 +0000 |
2788 | @@ -41,8 +41,10 @@ |
2789 | |
2790 | Next, we need to grab some values to provide for importance and status. |
2791 | |
2792 | - >>> from canonical.launchpad.interfaces import ( |
2793 | - ... BugTaskImportance, BugTaskStatus) |
2794 | + >>> from lp.bugs.interfaces.bugtask import ( |
2795 | + ... BugTaskImportance, |
2796 | + ... BugTaskStatus, |
2797 | + ... ) |
2798 | >>> STATUS_NEW = BugTaskStatus.NEW |
2799 | >>> STATUS_CONFIRMED = BugTaskStatus.CONFIRMED |
2800 | >>> STATUS_FIXRELEASED = BugTaskStatus.FIXRELEASED |
2801 | @@ -105,8 +107,8 @@ |
2802 | |
2803 | == Bug Task Targets == |
2804 | |
2805 | + >>> from lp.registry.interfaces.distributionsourcepackage import IDistributionSourcePackage |
2806 | >>> from lp.registry.model.distributionsourcepackage import DistributionSourcePackage |
2807 | - >>> from lp.registry.interfaces.distributionsourcepackage import IDistributionSourcePackage |
2808 | |
2809 | The "target" of an IBugTask can be one of the items in the following |
2810 | list. |
2811 | @@ -165,8 +167,8 @@ |
2812 | |
2813 | * a distroseries sourcepackage |
2814 | |
2815 | + >>> from lp.registry.interfaces.sourcepackage import ISourcePackage |
2816 | >>> from lp.registry.model.sourcepackage import SourcePackage |
2817 | - >>> from lp.registry.interfaces.sourcepackage import ISourcePackage |
2818 | >>> distro_series_sp_task = bugtaskset.get(16) |
2819 | >>> expected_target = SourcePackage( |
2820 | ... distroseries=distro_series_sp_task.distroseries, |
2821 | @@ -825,8 +827,8 @@ |
2822 | later on the interaction between privacy and teams (see the section |
2823 | entitled _Privacy and Team Awareness_): |
2824 | |
2825 | + >>> from lazr.lifecycle.snapshot import Snapshot |
2826 | >>> from lp.bugs.interfaces.bug import IBug |
2827 | - >>> from lazr.lifecycle.snapshot import Snapshot |
2828 | |
2829 | >>> bug_upstream_firefox_no_svg_support = bugtaskset.get(2) |
2830 | |
2831 | |
2832 | === modified file 'lib/lp/bugs/doc/bugtracker.txt' |
2833 | --- lib/lp/bugs/doc/bugtracker.txt 2010-10-09 16:36:22 +0000 |
2834 | +++ lib/lp/bugs/doc/bugtracker.txt 2010-10-20 01:49:43 +0000 |
2835 | @@ -139,8 +139,8 @@ |
2836 | bugtracker it will use make_bugtracker_name() to generate a name for the |
2837 | bug tracker. |
2838 | |
2839 | - >>> from canonical.launchpad.interfaces import ( |
2840 | - ... BugTrackerType, IPersonSet) |
2841 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
2842 | + >>> from lp.registry.interfaces.person import IPersonSet |
2843 | >>> sample_person = getUtility(IPersonSet).getByEmail( |
2844 | ... 'test@canonical.com') |
2845 | >>> a_bugtracker = bugtracker_set.ensureBugTracker( |
2846 | @@ -325,8 +325,8 @@ |
2847 | |
2848 | We will forge some BugMessage records before trying again: |
2849 | |
2850 | + >>> from zope.security.proxy import removeSecurityProxy |
2851 | >>> from lp.bugs.interfaces.bugmessage import IBugMessageSet |
2852 | - >>> from zope.security.proxy import removeSecurityProxy |
2853 | |
2854 | >>> for num, bug_watch in enumerate(mozilla_bugzilla.watches): |
2855 | ... bug_message = getUtility(IBugMessageSet).createMessage( |
2856 | |
2857 | === modified file 'lib/lp/bugs/doc/bugwatch.txt' |
2858 | --- lib/lp/bugs/doc/bugwatch.txt 2010-10-09 16:36:22 +0000 |
2859 | +++ lib/lp/bugs/doc/bugwatch.txt 2010-10-20 01:49:43 +0000 |
2860 | @@ -59,8 +59,9 @@ |
2861 | Watches of Email Address bugtrackers are slightly different: the `url` |
2862 | property is always the same as the bugtracker baseurl property. |
2863 | |
2864 | - >>> from canonical.launchpad.interfaces import ( |
2865 | - ... IBugSet, IBugTrackerSet, IPersonSet) |
2866 | + >>> from lp.bugs.interfaces.bug import IBugSet |
2867 | + >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
2868 | + >>> from lp.registry.interfaces.person import IPersonSet |
2869 | >>> bugtrackerset = getUtility(IBugTrackerSet) |
2870 | |
2871 | >>> email_bugtracker = bugtrackerset['email'] |
2872 | @@ -267,8 +268,8 @@ |
2873 | ... print "%s => %s" % (old_bugtask.importance.title, |
2874 | ... bugtask.importance.title) |
2875 | >>> from canonical.launchpad.ftests.event import TestEventListener |
2876 | + >>> from lazr.lifecycle.interfaces import IObjectModifiedEvent |
2877 | >>> from lp.bugs.interfaces.bugtask import IBugTask |
2878 | - >>> from lazr.lifecycle.interfaces import IObjectModifiedEvent |
2879 | >>> event_listener = TestEventListener( |
2880 | ... IBugTask, IObjectModifiedEvent, print_bugtask_modified) |
2881 | |
2882 | @@ -417,9 +418,13 @@ |
2883 | |
2884 | >>> from zope.component import getUtility |
2885 | >>> from canonical.database.sqlbase import flush_database_updates |
2886 | - >>> from canonical.launchpad.interfaces import ( |
2887 | - ... CreateBugParams, BugTrackerType, IBugTaskSet, |
2888 | - ... IBugTrackerSet, IDistributionSet) |
2889 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
2890 | + >>> from lp.bugs.interfaces.bugtask import IBugTaskSet |
2891 | + >>> from lp.bugs.interfaces.bugtracker import ( |
2892 | + ... BugTrackerType, |
2893 | + ... IBugTrackerSet, |
2894 | + ... ) |
2895 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
2896 | |
2897 | >>> ubuntu = getUtility(IDistributionSet).get(1) |
2898 | >>> firefox = ubuntu.getSourcePackage('mozilla-firefox') |
2899 | @@ -462,8 +467,8 @@ |
2900 | >>> import transaction |
2901 | >>> from lp.bugs.tests.externalbugtracker import ( |
2902 | ... TestRoundup) |
2903 | + >>> from canonical.launchpad.scripts.logger import FakeLogger |
2904 | >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster |
2905 | - >>> from canonical.launchpad.scripts.logger import FakeLogger |
2906 | >>> bug_watch_updater = CheckwatchesMaster(transaction, FakeLogger()) |
2907 | >>> external_bugtracker = TestRoundup(bug_tracker.baseurl) |
2908 | >>> bug_watch_updater.updateBugWatches(external_bugtracker, [bug_watch]) |
2909 | @@ -550,8 +555,8 @@ |
2910 | next_check time for the watch will be in the past (or in this case is |
2911 | now) and therefore it will be checked with the next checkwatches run. |
2912 | |
2913 | + >>> from datetime import datetime |
2914 | >>> from pytz import utc |
2915 | - >>> from datetime import datetime |
2916 | >>> schedulable_watch.next_check = datetime.now(utc) |
2917 | >>> schedulable_watch.can_be_rescheduled |
2918 | False |
2919 | |
2920 | === modified file 'lib/lp/bugs/doc/bugwidget.txt' |
2921 | --- lib/lp/bugs/doc/bugwidget.txt 2010-10-09 16:36:22 +0000 |
2922 | +++ lib/lp/bugs/doc/bugwidget.txt 2010-10-20 01:49:43 +0000 |
2923 | @@ -3,8 +3,8 @@ |
2924 | The BugWidget converts string bug ids to the corresponding bug object. |
2925 | |
2926 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
2927 | + >>> from canonical.widgets.bug import BugWidget |
2928 | >>> from lp.services.fields import BugField |
2929 | - >>> from canonical.widgets.bug import BugWidget |
2930 | >>> bug_field = BugField(__name__='bug', title=u'Bug') |
2931 | >>> request = LaunchpadTestRequest(form={'field.bug': '1'}) |
2932 | >>> bug_widget = BugWidget(bug_field, request) |
2933 | |
2934 | === modified file 'lib/lp/bugs/doc/bugzilla-import.txt' |
2935 | --- lib/lp/bugs/doc/bugzilla-import.txt 2010-10-03 15:30:06 +0000 |
2936 | +++ lib/lp/bugs/doc/bugzilla-import.txt 2010-10-20 01:49:43 +0000 |
2937 | @@ -106,9 +106,10 @@ |
2938 | |
2939 | >>> from zope.component import getUtility |
2940 | >>> from canonical.launchpad.ftests import login |
2941 | - >>> from canonical.launchpad.interfaces import ( |
2942 | - ... IBugSet, ILaunchpadCelebrities, IPersonSet) |
2943 | + >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
2944 | + >>> from lp.bugs.interfaces.bug import IBugSet |
2945 | >>> from lp.bugs.scripts import bugzilla |
2946 | + >>> from lp.registry.interfaces.person import IPersonSet |
2947 | |
2948 | Get a reference to the Ubuntu bug tracker, and log in: |
2949 | |
2950 | |
2951 | === modified file 'lib/lp/bugs/doc/checkwatches-batching.txt' |
2952 | --- lib/lp/bugs/doc/checkwatches-batching.txt 2010-04-21 10:30:24 +0000 |
2953 | +++ lib/lp/bugs/doc/checkwatches-batching.txt 2010-10-20 01:49:43 +0000 |
2954 | @@ -67,9 +67,9 @@ |
2955 | For bug watches that have been checked before, the remote system is |
2956 | asked which of a list of bugs have been modified since a given date. |
2957 | |
2958 | + >>> from zope.security.proxy import removeSecurityProxy |
2959 | >>> from datetime import datetime |
2960 | >>> from pytz import UTC |
2961 | - >>> from zope.security.proxy import removeSecurityProxy |
2962 | |
2963 | >>> class QueryableRemoteSystem: |
2964 | ... sync_comments = False |
2965 | |
2966 | === modified file 'lib/lp/bugs/doc/checkwatches-cli-switches.txt' |
2967 | --- lib/lp/bugs/doc/checkwatches-cli-switches.txt 2010-10-04 19:50:45 +0000 |
2968 | +++ lib/lp/bugs/doc/checkwatches-cli-switches.txt 2010-10-20 01:49:43 +0000 |
2969 | @@ -87,8 +87,8 @@ |
2970 | |
2971 | >>> import pytz |
2972 | >>> from datetime import datetime |
2973 | + >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
2974 | >>> from lp.testing.factory import LaunchpadObjectFactory |
2975 | - >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
2976 | |
2977 | >>> factory = LaunchpadObjectFactory() |
2978 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
2979 | |
2980 | === modified file 'lib/lp/bugs/doc/checkwatches.txt' |
2981 | --- lib/lp/bugs/doc/checkwatches.txt 2010-10-09 16:36:22 +0000 |
2982 | +++ lib/lp/bugs/doc/checkwatches.txt 2010-10-20 01:49:43 +0000 |
2983 | @@ -20,8 +20,8 @@ |
2984 | |
2985 | >>> from canonical.config import config |
2986 | >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
2987 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
2988 | >>> from lp.testing.factory import LaunchpadObjectFactory |
2989 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
2990 | |
2991 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
2992 | |
2993 | @@ -104,14 +104,13 @@ |
2994 | First, we create some bug watches to test with: |
2995 | |
2996 | >>> from datetime import datetime |
2997 | + >>> from lp.bugs.interfaces.bug import IBugSet |
2998 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
2999 | + >>> from lp.bugs.model.bugtracker import BugTracker |
3000 | >>> from pytz import utc |
3001 | - >>> from lp.bugs.model.bugtracker import BugTracker |
3002 | - >>> from canonical.launchpad.interfaces import ( |
3003 | - ... BugTrackerType, IBugSet) |
3004 | >>> from lp.bugs.scripts.checkwatches import ( |
3005 | ... CheckwatchesMaster) |
3006 | - >>> from canonical.launchpad.interfaces import ( |
3007 | - ... IPersonSet) |
3008 | + >>> from lp.registry.interfaces.person import IPersonSet |
3009 | >>> sample_person = getUtility(IPersonSet).getByEmail( |
3010 | ... 'test@canonical.com') |
3011 | |
3012 | @@ -257,8 +256,8 @@ |
3013 | batch size. We will also monkey-patch urllib2.urlopen again so that no |
3014 | requests are actually made. |
3015 | |
3016 | - >>> from lp.bugs import externalbugtracker |
3017 | >>> from canonical.launchpad.scripts import FakeLogger |
3018 | + >>> from lp.bugs import externalbugtracker |
3019 | |
3020 | >>> transaction.commit() |
3021 | >>> updater = CheckwatchesMaster(transaction.manager) |
3022 | |
3023 | === modified file 'lib/lp/bugs/doc/displaying-bugs-and-tasks.txt' |
3024 | --- lib/lp/bugs/doc/displaying-bugs-and-tasks.txt 2010-10-11 16:17:45 +0000 |
3025 | +++ lib/lp/bugs/doc/displaying-bugs-and-tasks.txt 2010-10-20 01:49:43 +0000 |
3026 | @@ -16,8 +16,10 @@ |
3027 | >>> from zope.component import getUtility |
3028 | >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
3029 | >>> from lp.bugs.interfaces.bugtask import BugTaskImportance, IBugTaskSet |
3030 | - >>> from canonical.launchpad.ftests import test_tales |
3031 | - >>> from canonical.launchpad.ftests import login |
3032 | + >>> from canonical.launchpad.ftests import ( |
3033 | + ... login, |
3034 | + ... test_tales, |
3035 | + ... ) |
3036 | |
3037 | >>> login("foo.bar@canonical.com") |
3038 | >>> bugtaskset = getUtility(IBugTaskSet) |
3039 | @@ -97,10 +99,10 @@ |
3040 | We define a helper that uses the BugTaskListingView class (obtained via |
3041 | +listing-view) to render the status: |
3042 | |
3043 | - >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
3044 | - >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
3045 | >>> from zope.component import getMultiAdapter |
3046 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
3047 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
3048 | + >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
3049 | |
3050 | >>> def render_bugtask_status(task): |
3051 | ... view = getMultiAdapter( |
3052 | |
3053 | === modified file 'lib/lp/bugs/doc/externalbugtracker-bug-imports.txt' |
3054 | --- lib/lp/bugs/doc/externalbugtracker-bug-imports.txt 2010-10-09 16:36:22 +0000 |
3055 | +++ lib/lp/bugs/doc/externalbugtracker-bug-imports.txt 2010-10-20 01:49:43 +0000 |
3056 | @@ -24,8 +24,8 @@ |
3057 | ... def getBugTargetName(self, remote_bug): |
3058 | ... return self._bugs[remote_bug]['package'] |
3059 | |
3060 | - >>> from canonical.launchpad.interfaces import ( |
3061 | - ... BugTrackerType, IDistributionSet) |
3062 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3063 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
3064 | >>> from lp.bugs.tests.externalbugtracker import ( |
3065 | ... new_bugtracker) |
3066 | >>> bugtracker = new_bugtracker(BugTrackerType.BUGZILLA) |
3067 | @@ -45,8 +45,8 @@ |
3068 | imported into, and the remote bug number. At the moment only |
3069 | distributions are supported as the bug target. |
3070 | |
3071 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3072 | >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster |
3073 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3074 | >>> debian = getUtility(IDistributionSet).getByName('debian') |
3075 | >>> external_bugtracker._bugs['3'] = { |
3076 | ... 'package': 'evolution', |
3077 | |
3078 | === modified file 'lib/lp/bugs/doc/externalbugtracker-bugzilla-api.txt' |
3079 | --- lib/lp/bugs/doc/externalbugtracker-bugzilla-api.txt 2010-10-15 20:45:24 +0000 |
3080 | +++ lib/lp/bugs/doc/externalbugtracker-bugzilla-api.txt 2010-10-20 01:49:43 +0000 |
3081 | @@ -386,8 +386,8 @@ |
3082 | means that we can use it to import comments from the remote Bugzilla |
3083 | instance. |
3084 | |
3085 | + >>> from canonical.launchpad.webapp.testing import verifyObject |
3086 | >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentImport |
3087 | - >>> from canonical.launchpad.webapp.testing import verifyObject |
3088 | >>> verifyObject(ISupportsCommentImport, bugzilla) |
3089 | True |
3090 | |
3091 | |
3092 | === modified file 'lib/lp/bugs/doc/externalbugtracker-bugzilla-lp-plugin.txt' |
3093 | --- lib/lp/bugs/doc/externalbugtracker-bugzilla-lp-plugin.txt 2010-10-09 16:36:22 +0000 |
3094 | +++ lib/lp/bugs/doc/externalbugtracker-bugzilla-lp-plugin.txt 2010-10-20 01:49:43 +0000 |
3095 | @@ -334,8 +334,8 @@ |
3096 | means that we can use it to import comments from the remote Bugzilla |
3097 | instance. |
3098 | |
3099 | + >>> from canonical.launchpad.webapp.testing import verifyObject |
3100 | >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentImport |
3101 | - >>> from canonical.launchpad.webapp.testing import verifyObject |
3102 | >>> verifyObject(ISupportsCommentImport, bugzilla) |
3103 | True |
3104 | |
3105 | |
3106 | === modified file 'lib/lp/bugs/doc/externalbugtracker-bugzilla-oddities.txt' |
3107 | --- lib/lp/bugs/doc/externalbugtracker-bugzilla-oddities.txt 2010-10-09 16:36:22 +0000 |
3108 | +++ lib/lp/bugs/doc/externalbugtracker-bugzilla-oddities.txt 2010-10-20 01:49:43 +0000 |
3109 | @@ -14,9 +14,9 @@ |
3110 | |
3111 | >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
3112 | |
3113 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3114 | + >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster |
3115 | >>> from lp.bugs.tests.externalbugtracker import TestIssuezilla |
3116 | - >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster |
3117 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3118 | >>> txn = LaunchpadZopelessLayer.txn |
3119 | >>> mozilla_bugzilla = getUtility(IBugTrackerSet).getByName('mozilla.org') |
3120 | >>> issuezilla = TestIssuezilla(mozilla_bugzilla.baseurl) |
3121 | |
3122 | === modified file 'lib/lp/bugs/doc/externalbugtracker-bugzilla.txt' |
3123 | --- lib/lp/bugs/doc/externalbugtracker-bugzilla.txt 2010-10-09 16:36:22 +0000 |
3124 | +++ lib/lp/bugs/doc/externalbugtracker-bugzilla.txt 2010-10-20 01:49:43 +0000 |
3125 | @@ -58,8 +58,8 @@ |
3126 | Since we don't want to depend on a working network connection, we use a |
3127 | slightly modified implementation. |
3128 | |
3129 | + >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
3130 | >>> from lp.bugs.tests.externalbugtracker import TestBugzilla |
3131 | - >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
3132 | >>> gnome_bugzilla = ( |
3133 | ... getUtility(IBugTrackerSet).getByName('gnome-bugzilla')) |
3134 | >>> external_bugzilla = TestBugzilla(gnome_bugzilla.baseurl) |
3135 | @@ -430,8 +430,9 @@ |
3136 | |
3137 | Let's add a handful of watches: |
3138 | |
3139 | - >>> from canonical.launchpad.interfaces import ( |
3140 | - ... IBugSet, IBugWatchSet, IPersonSet) |
3141 | + >>> from lp.bugs.interfaces.bug import IBugSet |
3142 | + >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet |
3143 | + >>> from lp.registry.interfaces.person import IPersonSet |
3144 | >>> sample_person = getUtility(IPersonSet).getByEmail( |
3145 | ... 'test@canonical.com') |
3146 | >>> bug_one = getUtility(IBugSet).get(1) |
3147 | |
3148 | === modified file 'lib/lp/bugs/doc/externalbugtracker-comment-imports.txt' |
3149 | --- lib/lp/bugs/doc/externalbugtracker-comment-imports.txt 2010-10-04 19:50:45 +0000 |
3150 | +++ lib/lp/bugs/doc/externalbugtracker-comment-imports.txt 2010-10-20 01:49:43 +0000 |
3151 | @@ -10,10 +10,14 @@ |
3152 | >>> from canonical.config import config |
3153 | >>> from lp.bugs.tests.externalbugtracker import ( |
3154 | ... new_bugtracker) |
3155 | - >>> from canonical.launchpad.interfaces import ( |
3156 | - ... BugTrackerType, CreateBugParams, IBugMessageSet, |
3157 | - ... IBugWatchSet, IMessageSet, IPersonSet, IProductSet) |
3158 | + >>> from canonical.launchpad.interfaces.message import IMessageSet |
3159 | >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3160 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
3161 | + >>> from lp.bugs.interfaces.bugmessage import IBugMessageSet |
3162 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3163 | + >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet |
3164 | + >>> from lp.registry.interfaces.person import IPersonSet |
3165 | + >>> from lp.registry.interfaces.product import IProductSet |
3166 | |
3167 | >>> bug_tracker = new_bugtracker(BugTrackerType.BUGZILLA) |
3168 | |
3169 | @@ -41,8 +45,7 @@ |
3170 | |
3171 | >>> from lp.bugs.externalbugtracker import ( |
3172 | ... ExternalBugTracker) |
3173 | - >>> from canonical.launchpad.interfaces import ( |
3174 | - ... ISupportsCommentImport) |
3175 | + >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentImport |
3176 | >>> class CommentImportingExternalBugTracker(ExternalBugTracker): |
3177 | ... implements(ISupportsCommentImport) |
3178 | ... |
3179 | |
3180 | === modified file 'lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt' |
3181 | --- lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt 2010-10-04 19:50:45 +0000 |
3182 | +++ lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt 2010-10-20 01:49:43 +0000 |
3183 | @@ -10,10 +10,14 @@ |
3184 | >>> from canonical.config import config |
3185 | >>> from lp.bugs.tests.externalbugtracker import ( |
3186 | ... new_bugtracker) |
3187 | - >>> from canonical.launchpad.interfaces import ( |
3188 | - ... BugTrackerType, CreateBugParams, IBugMessageSet, |
3189 | - ... IBugWatchSet, IMessageSet, IPersonSet, IProductSet) |
3190 | + >>> from canonical.launchpad.interfaces.message import IMessageSet |
3191 | >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3192 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
3193 | + >>> from lp.bugs.interfaces.bugmessage import IBugMessageSet |
3194 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3195 | + >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet |
3196 | + >>> from lp.registry.interfaces.person import IPersonSet |
3197 | + >>> from lp.registry.interfaces.product import IProductSet |
3198 | |
3199 | >>> bug_tracker = new_bugtracker(BugTrackerType.TRAC) |
3200 | |
3201 | @@ -46,8 +50,7 @@ |
3202 | an example ExternalBugTracker that implements the |
3203 | ISupportsCommentPushing interface. |
3204 | |
3205 | - >>> from canonical.launchpad.interfaces import ( |
3206 | - ... ISupportsCommentPushing) |
3207 | + >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentPushing |
3208 | >>> from lp.bugs.externalbugtracker import ( |
3209 | ... ExternalBugTracker) |
3210 | |
3211 | @@ -187,8 +190,7 @@ |
3212 | from the remote bugtracker. To demonstrate this, we need to create an |
3213 | example ExternalBugTracker that does comment importing. |
3214 | |
3215 | - >>> from canonical.launchpad.interfaces import ( |
3216 | - ... ISupportsCommentImport) |
3217 | + >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentImport |
3218 | >>> class CommentImportingExternalBugTracker( |
3219 | ... CommentPushingExternalBugTracker): |
3220 | ... implements(ISupportsCommentImport) |
3221 | |
3222 | === modified file 'lib/lp/bugs/doc/externalbugtracker-debbugs.txt' |
3223 | --- lib/lp/bugs/doc/externalbugtracker-debbugs.txt 2010-10-11 16:17:45 +0000 |
3224 | +++ lib/lp/bugs/doc/externalbugtracker-debbugs.txt 2010-10-20 01:49:43 +0000 |
3225 | @@ -6,8 +6,8 @@ |
3226 | test: |
3227 | |
3228 | >>> import os.path |
3229 | + >>> from canonical.config import config |
3230 | >>> from canonical.launchpad.components.ftests import __file__ |
3231 | - >>> from canonical.config import config |
3232 | >>> test_db_location = os.path.join( |
3233 | ... os.path.dirname(__file__), 'debbugs_db') |
3234 | |
3235 | @@ -348,8 +348,8 @@ |
3236 | |
3237 | >>> from lp.bugs.externalbugtracker import ( |
3238 | ... get_external_bugtracker) |
3239 | - >>> from canonical.launchpad.interfaces import ( |
3240 | - ... BugTrackerType, ISupportsCommentImport) |
3241 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3242 | + >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentImport |
3243 | >>> from lp.bugs.tests.externalbugtracker import ( |
3244 | ... new_bugtracker) |
3245 | >>> external_debbugs = get_external_bugtracker( |
3246 | @@ -438,8 +438,10 @@ |
3247 | Message. It requires a Person instance to be used as the Message's |
3248 | owner, so we'll turn Teun Vink into a Person. |
3249 | |
3250 | - >>> from canonical.launchpad.interfaces import ( |
3251 | - ... IPersonSet, PersonCreationRationale) |
3252 | + >>> from lp.registry.interfaces.person import ( |
3253 | + ... IPersonSet, |
3254 | + ... PersonCreationRationale, |
3255 | + ... ) |
3256 | >>> poster = getUtility(IPersonSet).ensurePerson( |
3257 | ... poster_email, poster_name, PersonCreationRationale.BUGIMPORT, |
3258 | ... comment='when importing comments for %s.' % bug_watch.title) |
3259 | |
3260 | === modified file 'lib/lp/bugs/doc/externalbugtracker-emailaddress.txt' |
3261 | --- lib/lp/bugs/doc/externalbugtracker-emailaddress.txt 2010-10-09 16:36:22 +0000 |
3262 | +++ lib/lp/bugs/doc/externalbugtracker-emailaddress.txt 2010-10-20 01:49:43 +0000 |
3263 | @@ -33,8 +33,11 @@ |
3264 | |
3265 | >>> from zope.component import getUtility |
3266 | >>> from canonical.launchpad.webapp.testing import verifyObject |
3267 | - >>> from canonical.launchpad.interfaces import ( |
3268 | - ... IBugTracker, IBugTrackerSet, IPersonSet) |
3269 | + >>> from lp.bugs.interfaces.bugtracker import ( |
3270 | + ... IBugTracker, |
3271 | + ... IBugTrackerSet, |
3272 | + ... ) |
3273 | + >>> from lp.registry.interfaces.person import IPersonSet |
3274 | |
3275 | >>> sample_person = getUtility(IPersonSet).getByEmail( |
3276 | ... 'test@canonical.com') |
3277 | |
3278 | === modified file 'lib/lp/bugs/doc/externalbugtracker-mantis-csv.txt' |
3279 | --- lib/lp/bugs/doc/externalbugtracker-mantis-csv.txt 2010-10-11 16:17:45 +0000 |
3280 | +++ lib/lp/bugs/doc/externalbugtracker-mantis-csv.txt 2010-10-20 01:49:43 +0000 |
3281 | @@ -53,8 +53,8 @@ |
3282 | |
3283 | >>> sample_person = getUtility(IPersonSet).getByEmail('test@canonical.com') |
3284 | |
3285 | + >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
3286 | >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3287 | - >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
3288 | >>> from lp.bugs.tests.externalbugtracker import ( |
3289 | ... new_bugtracker) |
3290 | >>> example_bug_tracker = new_bugtracker(BugTrackerType.MANTIS) |
3291 | |
3292 | === modified file 'lib/lp/bugs/doc/externalbugtracker-mantis.txt' |
3293 | --- lib/lp/bugs/doc/externalbugtracker-mantis.txt 2010-10-11 16:17:45 +0000 |
3294 | +++ lib/lp/bugs/doc/externalbugtracker-mantis.txt 2010-10-20 01:49:43 +0000 |
3295 | @@ -13,9 +13,9 @@ |
3296 | >>> from lp.bugs.externalbugtracker import Mantis |
3297 | >>> from lp.bugs.tests.externalbugtracker import ( |
3298 | ... new_bugtracker) |
3299 | - >>> from canonical.launchpad.interfaces import ( |
3300 | - ... BugTrackerType, IExternalBugTracker) |
3301 | >>> from canonical.launchpad.webapp.testing import verifyObject |
3302 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3303 | + >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker |
3304 | >>> alsa_mantis = Mantis('http://example.com/') |
3305 | |
3306 | >>> verifyObject(IExternalBugTracker, alsa_mantis) |
3307 | @@ -80,8 +80,8 @@ |
3308 | |
3309 | >>> transaction.commit() |
3310 | |
3311 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3312 | >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster |
3313 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3314 | >>> txn = LaunchpadZopelessLayer.txn |
3315 | >>> bug_watch_updater = CheckwatchesMaster(txn) |
3316 | >>> bug_watch_updater.updateBugWatches( |
3317 | |
3318 | === modified file 'lib/lp/bugs/doc/externalbugtracker-roundup.txt' |
3319 | --- lib/lp/bugs/doc/externalbugtracker-roundup.txt 2010-10-11 16:17:45 +0000 |
3320 | +++ lib/lp/bugs/doc/externalbugtracker-roundup.txt 2010-10-20 01:49:43 +0000 |
3321 | @@ -11,8 +11,8 @@ |
3322 | implements IExternalBugTracker. |
3323 | |
3324 | >>> from lp.bugs.externalbugtracker import Roundup |
3325 | - >>> from canonical.launchpad.interfaces import ( |
3326 | - ... BugTrackerType, IExternalBugTracker) |
3327 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3328 | + >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker |
3329 | >>> from lp.bugs.tests.externalbugtracker import ( |
3330 | ... new_bugtracker) |
3331 | >>> from canonical.launchpad.webapp.testing import verifyObject |
3332 | @@ -138,8 +138,8 @@ |
3333 | |
3334 | >>> transaction.commit() |
3335 | |
3336 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3337 | >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster |
3338 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3339 | >>> txn = LaunchpadZopelessLayer.txn |
3340 | >>> bug_watch_updater = CheckwatchesMaster(txn) |
3341 | >>> roundup = TestRoundup(example_bug_tracker.baseurl) |
3342 | |
3343 | === modified file 'lib/lp/bugs/doc/externalbugtracker-rt.txt' |
3344 | --- lib/lp/bugs/doc/externalbugtracker-rt.txt 2010-10-09 16:36:22 +0000 |
3345 | +++ lib/lp/bugs/doc/externalbugtracker-rt.txt 2010-10-20 01:49:43 +0000 |
3346 | @@ -11,8 +11,8 @@ |
3347 | |
3348 | >>> from lp.bugs.externalbugtracker import ( |
3349 | ... RequestTracker) |
3350 | - >>> from canonical.launchpad.interfaces import ( |
3351 | - ... BugTrackerType, IExternalBugTracker) |
3352 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3353 | + >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker |
3354 | >>> from lp.bugs.tests.externalbugtracker import ( |
3355 | ... new_bugtracker) |
3356 | >>> from canonical.launchpad.webapp.testing import verifyObject |
3357 | @@ -155,8 +155,9 @@ |
3358 | First, we create some bug watches to test with. Example.com hosts an RT |
3359 | instance which has several bugs that we wish to watch: |
3360 | |
3361 | - >>> from canonical.launchpad.interfaces import ( |
3362 | - ... IBugSet, IBugWatchSet, IPersonSet) |
3363 | + >>> from lp.bugs.interfaces.bug import IBugSet |
3364 | + >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet |
3365 | + >>> from lp.registry.interfaces.person import IPersonSet |
3366 | >>> from lp.bugs.tests.externalbugtracker import ( |
3367 | ... print_bugwatches) |
3368 | |
3369 | @@ -180,8 +181,8 @@ |
3370 | |
3371 | >>> transaction.commit() |
3372 | |
3373 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3374 | >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster |
3375 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3376 | >>> txn = LaunchpadZopelessLayer.txn |
3377 | >>> bug_watch_updater = CheckwatchesMaster(txn) |
3378 | >>> rt = TestRequestTracker(example_bug_tracker.baseurl) |
3379 | |
3380 | === modified file 'lib/lp/bugs/doc/externalbugtracker-sourceforge.txt' |
3381 | --- lib/lp/bugs/doc/externalbugtracker-sourceforge.txt 2010-10-09 16:36:22 +0000 |
3382 | +++ lib/lp/bugs/doc/externalbugtracker-sourceforge.txt 2010-10-20 01:49:43 +0000 |
3383 | @@ -12,9 +12,9 @@ |
3384 | |
3385 | >>> from lp.bugs.externalbugtracker import ( |
3386 | ... SourceForge) |
3387 | - >>> from canonical.launchpad.interfaces import ( |
3388 | - ... BugTrackerType, IExternalBugTracker) |
3389 | >>> from canonical.launchpad.webapp.testing import verifyObject |
3390 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3391 | + >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker |
3392 | >>> verifyObject(IExternalBugTracker, |
3393 | ... SourceForge('http://example.com')) |
3394 | True |
3395 | @@ -161,8 +161,8 @@ |
3396 | |
3397 | >>> transaction.commit() |
3398 | |
3399 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3400 | >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster |
3401 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3402 | >>> txn = LaunchpadZopelessLayer.txn |
3403 | >>> bug_watch_updater = CheckwatchesMaster(txn) |
3404 | >>> sourceforge = TestSourceForge(example_bug_tracker.baseurl) |
3405 | |
3406 | === modified file 'lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt' |
3407 | --- lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt 2010-10-09 16:36:22 +0000 |
3408 | +++ lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt 2010-10-20 01:49:43 +0000 |
3409 | @@ -31,8 +31,8 @@ |
3410 | |
3411 | >>> import random |
3412 | >>> from canonical.config import config |
3413 | + >>> from canonical.launchpad.interfaces.logintoken import ILoginTokenSet |
3414 | >>> from canonical.launchpad.webapp.url import urlappend |
3415 | - >>> from canonical.launchpad.interfaces.logintoken import ILoginTokenSet |
3416 | >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3417 | |
3418 | >>> class FakeResponse: |
3419 | @@ -338,8 +338,10 @@ |
3420 | We also need an example Bug, BugTracker and BugWatch. |
3421 | |
3422 | >>> from canonical.database.sqlbase import commit |
3423 | - >>> from canonical.launchpad.interfaces import ( |
3424 | - ... BugTrackerType, CreateBugParams, IPersonSet, IProductSet) |
3425 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
3426 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3427 | + >>> from lp.registry.interfaces.person import IPersonSet |
3428 | + >>> from lp.registry.interfaces.product import IProductSet |
3429 | >>> from lp.bugs.tests.externalbugtracker import ( |
3430 | ... new_bugtracker) |
3431 | |
3432 | |
3433 | === modified file 'lib/lp/bugs/doc/externalbugtracker-trac.txt' |
3434 | --- lib/lp/bugs/doc/externalbugtracker-trac.txt 2010-10-11 16:17:45 +0000 |
3435 | +++ lib/lp/bugs/doc/externalbugtracker-trac.txt 2010-10-20 01:49:43 +0000 |
3436 | @@ -13,9 +13,9 @@ |
3437 | >>> from lp.bugs.externalbugtracker import Trac |
3438 | >>> from lp.bugs.tests.externalbugtracker import ( |
3439 | ... new_bugtracker) |
3440 | - >>> from canonical.launchpad.interfaces import ( |
3441 | - ... BugTrackerType, IExternalBugTracker) |
3442 | >>> from canonical.launchpad.webapp.testing import verifyObject |
3443 | + >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3444 | + >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker |
3445 | >>> trac = Trac('http://example.com/') |
3446 | >>> verifyObject(IExternalBugTracker, trac) |
3447 | True |
3448 | @@ -55,9 +55,9 @@ |
3449 | a valid token, which is very unlikely), is that the broken Trac will |
3450 | not include a "trac_auth" cookie. |
3451 | |
3452 | + >>> from StringIO import StringIO |
3453 | >>> from httplib import HTTPMessage |
3454 | >>> from urllib import addinfourl |
3455 | - >>> from StringIO import StringIO |
3456 | |
3457 | >>> class TracReturning200ForPageNotFound(Trac): |
3458 | ... def urlopen(self, url): |
3459 | @@ -298,8 +298,8 @@ |
3460 | |
3461 | >>> transaction.commit() |
3462 | |
3463 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3464 | >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster |
3465 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3466 | >>> txn = LaunchpadZopelessLayer.txn |
3467 | >>> bug_watch_updater = CheckwatchesMaster(txn) |
3468 | >>> trac = TestTrac(example_bug_tracker.baseurl) |
3469 | |
3470 | === modified file 'lib/lp/bugs/doc/externalbugtracker.txt' |
3471 | --- lib/lp/bugs/doc/externalbugtracker.txt 2010-10-09 16:36:22 +0000 |
3472 | +++ lib/lp/bugs/doc/externalbugtracker.txt 2010-10-20 01:49:43 +0000 |
3473 | @@ -433,9 +433,9 @@ |
3474 | getModifiedRemoteBugs(). I.e., if we have a set of newly created bug |
3475 | watches, the getModifiedRemoteBugs() method won't be called. |
3476 | |
3477 | - >>> from lp.bugs.model.bugtracker import BugTracker |
3478 | >>> from lp.bugs.interfaces.bug import IBugSet |
3479 | >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet |
3480 | + >>> from lp.bugs.model.bugtracker import BugTracker |
3481 | >>> from lp.registry.interfaces.person import IPersonSet |
3482 | |
3483 | >>> sample_person = getUtility(IPersonSet).getByEmail( |
3484 | |
3485 | === modified file 'lib/lp/bugs/doc/hasbugs.txt' |
3486 | --- lib/lp/bugs/doc/hasbugs.txt 2010-10-10 15:39:28 +0000 |
3487 | +++ lib/lp/bugs/doc/hasbugs.txt 2010-10-20 01:49:43 +0000 |
3488 | @@ -5,8 +5,8 @@ |
3489 | between the object and some of the bug tasks connected to it, and allows |
3490 | searching through the list of bugs. |
3491 | |
3492 | + >>> from zope.component import getUtility |
3493 | >>> from canonical.launchpad.webapp.testing import verifyObject |
3494 | - >>> from zope.component import getUtility |
3495 | >>> from lp.bugs.interfaces.bugtarget import IHasBugs |
3496 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
3497 | >>> distroset = getUtility(IDistributionSet) |
3498 | @@ -30,8 +30,11 @@ |
3499 | |
3500 | >>> login("foo.bar@canonical.com") |
3501 | |
3502 | - >>> from canonical.launchpad.interfaces import ( |
3503 | - ... BugTaskImportance, BugTaskStatus, IBugTaskSet) |
3504 | + >>> from lp.bugs.interfaces.bugtask import ( |
3505 | + ... BugTaskImportance, |
3506 | + ... BugTaskStatus, |
3507 | + ... IBugTaskSet, |
3508 | + ... ) |
3509 | |
3510 | >>> bug_one_in_debian_firefox = getUtility(IBugTaskSet).get(4) |
3511 | >>> bug_two_in_debian_firefox = getUtility(IBugTaskSet).get(5) |
3512 | |
3513 | === modified file 'lib/lp/bugs/doc/initial-bug-contacts.txt' |
3514 | --- lib/lp/bugs/doc/initial-bug-contacts.txt 2010-10-14 18:42:19 +0000 |
3515 | +++ lib/lp/bugs/doc/initial-bug-contacts.txt 2010-10-20 01:49:43 +0000 |
3516 | @@ -388,9 +388,9 @@ |
3517 | The list of teams that a user may add to a package as a bug supervisor will |
3518 | only contain those teams of which the user is an administrator. |
3519 | |
3520 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
3521 | >>> from zope.component import getMultiAdapter |
3522 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
3523 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
3524 | |
3525 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
3526 | >>> package = ubuntu.getSourcePackage('mozilla-firefox') |
3527 | |
3528 | === modified file 'lib/lp/bugs/doc/malone-karma.txt' |
3529 | --- lib/lp/bugs/doc/malone-karma.txt 2010-10-10 15:39:28 +0000 |
3530 | +++ lib/lp/bugs/doc/malone-karma.txt 2010-10-20 01:49:43 +0000 |
3531 | @@ -2,8 +2,10 @@ |
3532 | import some stuff and define a function to help us make the |
3533 | documentation cleaner: |
3534 | |
3535 | - >>> from canonical.launchpad.interfaces import ( |
3536 | - ... IBugSet, IDistributionSet, IKarmaActionSet, IPersonSet) |
3537 | + >>> from lp.bugs.interfaces.bug import IBugSet |
3538 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
3539 | + >>> from lp.registry.interfaces.karma import IKarmaActionSet |
3540 | + >>> from lp.registry.interfaces.person import IPersonSet |
3541 | >>> foo_bar = getUtility(IPersonSet).getByEmail('foo.bar@canonical.com') |
3542 | |
3543 | Setup an event listener to help ensure karma is assigned when it should. |
3544 | @@ -70,8 +72,10 @@ |
3545 | |
3546 | Mark a bug task as fixed: |
3547 | |
3548 | - >>> from canonical.launchpad.interfaces import ( |
3549 | - ... BugTaskStatus, IDistroBugTask) |
3550 | + >>> from lp.bugs.interfaces.bugtask import ( |
3551 | + ... BugTaskStatus, |
3552 | + ... IDistroBugTask, |
3553 | + ... ) |
3554 | >>> bugtask = bug.bugtasks[0] |
3555 | >>> old_bugtask = Snapshot(bugtask, providing=IDistroBugTask) |
3556 | >>> bugtask.transitionToStatus( |
3557 | |
3558 | === modified file 'lib/lp/bugs/doc/malone-xmlrpc.txt' |
3559 | --- lib/lp/bugs/doc/malone-xmlrpc.txt 2010-10-09 16:36:22 +0000 |
3560 | +++ lib/lp/bugs/doc/malone-xmlrpc.txt 2010-10-20 01:49:43 +0000 |
3561 | @@ -46,8 +46,8 @@ |
3562 | IObjectCreatedEvent is being published when a bug is reported through |
3563 | the XML-RPC interface. |
3564 | |
3565 | + >>> from canonical.launchpad.ftests.event import TestEventListener |
3566 | >>> from lazr.lifecycle.interfaces import IObjectCreatedEvent |
3567 | - >>> from canonical.launchpad.ftests.event import TestEventListener |
3568 | >>> from lp.bugs.interfaces.bug import IBug |
3569 | |
3570 | >>> def on_created_event(obj, event): |
3571 | @@ -233,8 +233,10 @@ |
3572 | for authentication with external bug trackers. |
3573 | |
3574 | >>> from zope.component import getUtility |
3575 | - >>> from canonical.launchpad.interfaces import ( |
3576 | - ... IPrivateMaloneApplication, IPrivateApplication) |
3577 | + >>> from canonical.launchpad.interfaces.launchpad import ( |
3578 | + ... IPrivateApplication, |
3579 | + ... IPrivateMaloneApplication, |
3580 | + ... ) |
3581 | >>> from canonical.launchpad.webapp.testing import verifyObject |
3582 | |
3583 | >>> private_root = getUtility(IPrivateApplication) |
3584 | @@ -245,9 +247,9 @@ |
3585 | The API provides a single method, newBugTrackerToken(), which returns |
3586 | the ID of the new LoginToken. |
3587 | |
3588 | + >>> from canonical.launchpad.interfaces.logintoken import ILoginTokenSet |
3589 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
3590 | - >>> from canonical.launchpad.interfaces import ( |
3591 | - ... IExternalBugTrackerTokenAPI, ILoginTokenSet) |
3592 | + >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTrackerTokenAPI |
3593 | >>> from lp.bugs.xmlrpc.bug import ( |
3594 | ... ExternalBugTrackerTokenAPI) |
3595 | |
3596 | |
3597 | === modified file 'lib/lp/bugs/doc/official-bug-tags.txt' |
3598 | --- lib/lp/bugs/doc/official-bug-tags.txt 2010-10-09 16:36:22 +0000 |
3599 | +++ lib/lp/bugs/doc/official-bug-tags.txt 2010-10-20 01:49:43 +0000 |
3600 | @@ -3,8 +3,8 @@ |
3601 | Distributions and products can define official bug tags. |
3602 | |
3603 | >>> from zope.component import getUtility |
3604 | - >>> from canonical.launchpad.interfaces import ( |
3605 | - ... IDistributionSet, IProductSet) |
3606 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
3607 | + >>> from lp.registry.interfaces.product import IProductSet |
3608 | >>> from canonical.launchpad.webapp.interfaces import ( |
3609 | ... IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR) |
3610 | >>> from lp.bugs.model.bugtarget import OfficialBugTag |
3611 | |
3612 | === modified file 'lib/lp/bugs/doc/security-teams.txt' |
3613 | --- lib/lp/bugs/doc/security-teams.txt 2010-10-11 16:17:45 +0000 |
3614 | +++ lib/lp/bugs/doc/security-teams.txt 2010-10-20 01:49:43 +0000 |
3615 | @@ -5,10 +5,10 @@ |
3616 | a "security contact" on a Distribution or a Product. |
3617 | |
3618 | >>> from zope.component import getUtility |
3619 | + >>> from lp.bugs.interfaces.securitycontact import IHasSecurityContact |
3620 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
3621 | >>> from lp.registry.interfaces.person import IPersonSet |
3622 | >>> from lp.registry.interfaces.product import IProductSet |
3623 | - >>> from lp.bugs.interfaces.securitycontact import IHasSecurityContact |
3624 | |
3625 | >>> personset = getUtility(IPersonSet) |
3626 | >>> productset = getUtility(IProductSet) |
3627 | @@ -280,10 +280,10 @@ |
3628 | When a bug becomes security-related, the security contacts for the pillars it |
3629 | affects are subscribed to it. |
3630 | |
3631 | + >>> from zope.event import notify |
3632 | + >>> from lazr.lifecycle.event import ObjectModifiedEvent |
3633 | + >>> from lazr.lifecycle.snapshot import Snapshot |
3634 | >>> from lp.bugs.interfaces.bug import IBug |
3635 | - >>> from zope.event import notify |
3636 | - >>> from lazr.lifecycle.event import ObjectModifiedEvent |
3637 | - >>> from lazr.lifecycle.snapshot import Snapshot |
3638 | |
3639 | >>> product = factory.makeProduct() |
3640 | >>> product.security_contact = factory.makePerson( |
3641 | |
3642 | === modified file 'lib/lp/bugs/doc/sourceforge-remote-products.txt' |
3643 | --- lib/lp/bugs/doc/sourceforge-remote-products.txt 2010-10-04 19:50:45 +0000 |
3644 | +++ lib/lp/bugs/doc/sourceforge-remote-products.txt 2010-10-20 01:49:43 +0000 |
3645 | @@ -21,8 +21,8 @@ |
3646 | If we add a Product and link it to a SourceForge project, |
3647 | getSFLinkedProductsWithNoneRemoteProduct() will return it. |
3648 | |
3649 | + >>> from lp.testing.factory import LaunchpadObjectFactory |
3650 | >>> from transaction import commit |
3651 | - >>> from lp.testing.factory import LaunchpadObjectFactory |
3652 | >>> factory = LaunchpadObjectFactory() |
3653 | |
3654 | >>> product_1 = factory.makeProduct(name='my-first-product') |
3655 | |
3656 | === modified file 'lib/lp/bugs/stories/bug-privacy/40-unsubscribe-from-private-bug.txt' |
3657 | --- lib/lp/bugs/stories/bug-privacy/40-unsubscribe-from-private-bug.txt 2010-10-04 20:46:55 +0000 |
3658 | +++ lib/lp/bugs/stories/bug-privacy/40-unsubscribe-from-private-bug.txt 2010-10-20 01:49:43 +0000 |
3659 | @@ -1,10 +1,11 @@ |
3660 | First, some setup. Find out what the latest [private] bug reported on |
3661 | Ubuntu evolution is, so we can avoid hardcoding its ID here: |
3662 | |
3663 | - >>> from canonical.launchpad.interfaces import ( |
3664 | - ... IDistributionSet, BugTaskSearchParams, ILaunchBag, |
3665 | - ... ISourcePackageNameSet) |
3666 | >>> from zope.component import getUtility |
3667 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
3668 | + >>> from lp.bugs.interfaces.bugtask import BugTaskSearchParams |
3669 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
3670 | + >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
3671 | >>> from canonical.launchpad.ftests import login, logout |
3672 | |
3673 | >>> login("foo.bar@canonical.com") |
3674 | |
3675 | === modified file 'lib/lp/bugs/stories/bug-tags/xx-official-bug-tags.txt' |
3676 | --- lib/lp/bugs/stories/bug-tags/xx-official-bug-tags.txt 2010-10-15 14:26:57 +0000 |
3677 | +++ lib/lp/bugs/stories/bug-tags/xx-official-bug-tags.txt 2010-10-20 01:49:43 +0000 |
3678 | @@ -101,8 +101,8 @@ |
3679 | |
3680 | The tags portlet displays a mix of official and unofficial tags. |
3681 | |
3682 | + >>> from zope.component import getUtility |
3683 | >>> from lp.registry.interfaces.product import IProductSet |
3684 | - >>> from zope.component import getUtility |
3685 | >>> login('foo.bar@canonical.com') |
3686 | >>> firesocks = factory.makeProduct(name='firesocks') |
3687 | >>> firesocks_bugs_url = canonical_url(firesocks, rootsite='bugs') |
3688 | |
3689 | === modified file 'lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt' |
3690 | --- lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt 2010-10-09 16:36:22 +0000 |
3691 | +++ lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt 2010-10-20 01:49:43 +0000 |
3692 | @@ -22,8 +22,8 @@ |
3693 | >>> import StringIO |
3694 | >>> from zope.component import getUtility |
3695 | >>> from canonical.launchpad.ftests import login, logout, syncUpdate |
3696 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
3697 | >>> from lp.bugs.interfaces.bug import IBugSet |
3698 | - >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
3699 | >>> login("test@canonical.com") |
3700 | >>> bug_11 = getUtility(IBugSet).get(11) |
3701 | >>> launchbag = getUtility(ILaunchBag) |
3702 | |
3703 | === modified file 'lib/lp/bugs/stories/bugs/xx-bug-nomination-table-row.txt' |
3704 | --- lib/lp/bugs/stories/bugs/xx-bug-nomination-table-row.txt 2010-10-10 15:39:28 +0000 |
3705 | +++ lib/lp/bugs/stories/bugs/xx-bug-nomination-table-row.txt 2010-10-20 01:49:43 +0000 |
3706 | @@ -12,9 +12,9 @@ |
3707 | >>> from zope.component import getUtility |
3708 | |
3709 | >>> from canonical.launchpad.ftests import login, logout |
3710 | + >>> from canonical.launchpad.webapp.authorization import check_permission |
3711 | >>> from lp.bugs.interfaces.bug import IBugSet |
3712 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
3713 | - >>> from canonical.launchpad.webapp.authorization import check_permission |
3714 | |
3715 | >>> login("no-priv@canonical.com") |
3716 | |
3717 | |
3718 | === modified file 'lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt' |
3719 | --- lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt 2010-10-03 15:30:06 +0000 |
3720 | +++ lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt 2010-10-20 01:49:43 +0000 |
3721 | @@ -39,8 +39,9 @@ |
3722 | |
3723 | >>> from zope.component import getUtility |
3724 | >>> from canonical.launchpad.ftests import login, logout, syncUpdate |
3725 | - >>> from canonical.launchpad.interfaces import ( |
3726 | - ... BugTaskStatus, IBugSet, ILaunchBag) |
3727 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
3728 | + >>> from lp.bugs.interfaces.bug import IBugSet |
3729 | + >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
3730 | |
3731 | >>> login("foo.bar@canonical.com") |
3732 | |
3733 | |
3734 | === modified file 'lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt' |
3735 | --- lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt 2010-10-03 15:30:06 +0000 |
3736 | +++ lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt 2010-10-20 01:49:43 +0000 |
3737 | @@ -9,8 +9,11 @@ |
3738 | >>> from zope.component import getUtility |
3739 | >>> from canonical.launchpad.ftests import login, logout |
3740 | >>> import transaction |
3741 | - >>> from canonical.launchpad.interfaces import ( |
3742 | - ... BugTaskImportance, BugTaskStatus, ILaunchBag) |
3743 | + >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
3744 | + >>> from lp.bugs.interfaces.bugtask import ( |
3745 | + ... BugTaskImportance, |
3746 | + ... BugTaskStatus, |
3747 | + ... ) |
3748 | >>> login('foo.bar@canonical.com') |
3749 | >>> bigfixer = factory.makeProduct(name='bigfixer') |
3750 | >>> for bug_x in range(1, 11): |
3751 | |
3752 | === modified file 'lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt' |
3753 | --- lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt 2010-10-09 16:36:22 +0000 |
3754 | +++ lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt 2010-10-20 01:49:43 +0000 |
3755 | @@ -104,9 +104,9 @@ |
3756 | detailing the amount of time that has passed since the bug's expiration |
3757 | date. We alter the date_last_updated field of bug 11 to demonstrate this. |
3758 | |
3759 | - >>> from datetime import timedelta |
3760 | >>> from zope.component import getUtility |
3761 | >>> from canonical.database.sqlbase import flush_database_updates |
3762 | + >>> from datetime import timedelta |
3763 | >>> from canonical.launchpad.ftests import login, logout |
3764 | >>> from lp.bugs.interfaces.bug import IBugSet |
3765 | >>> login('test@canonical.com') |
3766 | |
3767 | === modified file 'lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt' |
3768 | --- lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt 2010-10-08 12:06:55 +0000 |
3769 | +++ lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt 2010-10-20 01:49:43 +0000 |
3770 | @@ -55,8 +55,8 @@ |
3771 | >>> print ff_bugtask.bug.id |
3772 | 4 |
3773 | |
3774 | + >>> from lp.registry.interfaces.milestone import IMilestoneSet |
3775 | >>> from lp.registry.interfaces.product import IProductSet |
3776 | - >>> from lp.registry.interfaces.milestone import IMilestoneSet |
3777 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
3778 | >>> ff_milestone = getUtility(IMilestoneSet).getByNameAndProduct( |
3779 | ... "1.0", firefox) |
3780 | |
3781 | === modified file 'lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt' |
3782 | --- lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt 2010-10-14 18:42:19 +0000 |
3783 | +++ lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt 2010-10-20 01:49:43 +0000 |
3784 | @@ -72,9 +72,9 @@ |
3785 | the 'awaiting synchronization' mark goes away. |
3786 | |
3787 | >>> from zope.component import getUtility |
3788 | + >>> from canonical.database.sqlbase import flush_database_updates |
3789 | >>> from lp.bugs.interfaces.bug import IBugSet |
3790 | >>> from lp.bugs.interfaces.bugmessage import IBugMessageSet |
3791 | - >>> from canonical.database.sqlbase import flush_database_updates |
3792 | >>> login('foo.bar@canonical.com') |
3793 | >>> bug_15 = getUtility(IBugSet).get(15) |
3794 | >>> message = bug_15.messages[-1] |
3795 | |
3796 | === modified file 'lib/lp/bugs/stories/bugtask-management/xx-bug-importance-change.txt' |
3797 | --- lib/lp/bugs/stories/bugtask-management/xx-bug-importance-change.txt 2010-10-03 15:30:06 +0000 |
3798 | +++ lib/lp/bugs/stories/bugtask-management/xx-bug-importance-change.txt 2010-10-20 01:49:43 +0000 |
3799 | @@ -23,8 +23,9 @@ |
3800 | >>> from zope.component import getUtility |
3801 | |
3802 | >>> from canonical.launchpad.ftests import ANONYMOUS, login, logout |
3803 | - >>> from canonical.launchpad.interfaces import ( |
3804 | - ... IPersonSet, IProductSet, IDistributionSet) |
3805 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
3806 | + >>> from lp.registry.interfaces.person import IPersonSet |
3807 | + >>> from lp.registry.interfaces.product import IProductSet |
3808 | |
3809 | >>> login("foo.bar@canonical.com") |
3810 | |
3811 | |
3812 | === modified file 'lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt' |
3813 | --- lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt 2010-10-06 18:27:57 +0000 |
3814 | +++ lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt 2010-10-20 01:49:43 +0000 |
3815 | @@ -233,10 +233,11 @@ |
3816 | Patches also appear as badges in bug listings. |
3817 | |
3818 | >>> from canonical.launchpad.ftests import login, logout |
3819 | - >>> from canonical.launchpad.interfaces import ( |
3820 | - ... IBugSet, IMessageSet, IPersonSet) |
3821 | >>> from zope.component import getUtility |
3822 | >>> from StringIO import StringIO |
3823 | + >>> from canonical.launchpad.interfaces.message import IMessageSet |
3824 | + >>> from lp.bugs.interfaces.bug import IBugSet |
3825 | + >>> from lp.registry.interfaces.person import IPersonSet |
3826 | >>> import transaction |
3827 | >>> login("foo.bar@canonical.com") |
3828 | >>> foobar = getUtility(IPersonSet).getByName("name16") |
3829 | |
3830 | === modified file 'lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt' |
3831 | --- lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt 2010-10-03 15:30:06 +0000 |
3832 | +++ lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt 2010-10-20 01:49:43 +0000 |
3833 | @@ -7,9 +7,10 @@ |
3834 | |
3835 | First, we create some bugs. |
3836 | |
3837 | - >>> from canonical.launchpad.interfaces import ( |
3838 | - ... IPersonSet, IProductSet, CreateBugParams) |
3839 | >>> from zope.component import getUtility |
3840 | + >>> from lp.bugs.interfaces.bug import CreateBugParams |
3841 | + >>> from lp.registry.interfaces.person import IPersonSet |
3842 | + >>> from lp.registry.interfaces.product import IProductSet |
3843 | >>> from canonical.launchpad.ftests import login, logout |
3844 | |
3845 | >>> login("no-priv@canonical.com") |
3846 | |
3847 | === modified file 'lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt' |
3848 | --- lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt 2010-08-26 14:57:11 +0000 |
3849 | +++ lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt 2010-10-20 01:49:43 +0000 |
3850 | @@ -60,9 +60,9 @@ |
3851 | If we change the next_check date of the watch its will be shown in the |
3852 | Next check column. |
3853 | |
3854 | + >>> from zope.component import getUtility |
3855 | >>> from datetime import datetime |
3856 | >>> from pytz import utc |
3857 | - >>> from zope.component import getUtility |
3858 | |
3859 | >>> from canonical.launchpad.ftests import login, logout |
3860 | >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet |
3861 | |
3862 | === modified file 'lib/lp/bugs/stories/cve/cve-linking.txt' |
3863 | --- lib/lp/bugs/stories/cve/cve-linking.txt 2010-10-11 16:17:45 +0000 |
3864 | +++ lib/lp/bugs/stories/cve/cve-linking.txt 2010-10-20 01:49:43 +0000 |
3865 | @@ -109,9 +109,9 @@ |
3866 | # This should use a private bug in our sample data. |
3867 | >>> from zope.component import getUtility |
3868 | >>> from canonical.launchpad.ftests import login, logout |
3869 | + >>> from canonical.database.sqlbase import flush_database_updates |
3870 | >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
3871 | >>> from lp.bugs.interfaces.bug import IBugSet |
3872 | - >>> from canonical.database.sqlbase import flush_database_updates |
3873 | >>> login('foo.bar@canonical.com') |
3874 | >>> private_bug = getUtility(IBugSet).get(6) |
3875 | >>> current_user = getUtility(ILaunchBag).user |
3876 | |
3877 | === modified file 'lib/lp/bugs/stories/feeds/xx-bug-atom.txt' |
3878 | --- lib/lp/bugs/stories/feeds/xx-bug-atom.txt 2010-10-09 16:36:22 +0000 |
3879 | +++ lib/lp/bugs/stories/feeds/xx-bug-atom.txt 2010-10-20 01:49:43 +0000 |
3880 | @@ -338,8 +338,8 @@ |
3881 | This feed gets the latest bugs for a whole team. |
3882 | First, make a team responsible for some bugs. |
3883 | |
3884 | + >>> from zope.component import getUtility |
3885 | >>> from lp.registry.interfaces.person import IPersonSet |
3886 | - >>> from zope.component import getUtility |
3887 | >>> one_mem_browser = setupBrowser( |
3888 | ... auth='Basic one-membership@test.com:test') |
3889 | >>> personset = getUtility(IPersonSet) |
3890 | |
3891 | === modified file 'lib/lp/bugs/stories/feeds/xx-bug-html.txt' |
3892 | --- lib/lp/bugs/stories/feeds/xx-bug-html.txt 2009-10-13 19:51:20 +0000 |
3893 | +++ lib/lp/bugs/stories/feeds/xx-bug-html.txt 2010-10-20 01:49:43 +0000 |
3894 | @@ -4,8 +4,10 @@ |
3895 | The content of an HTML feed is very similar to an Atom feed, but is formatted |
3896 | as HTML instead of Atom. |
3897 | |
3898 | - >>> from BeautifulSoup import BeautifulSoup |
3899 | - >>> from BeautifulSoup import SoupStrainer |
3900 | + >>> from BeautifulSoup import ( |
3901 | + ... BeautifulSoup, |
3902 | + ... SoupStrainer, |
3903 | + ... ) |
3904 | |
3905 | Define a helper function for parsing the entries: |
3906 | |
3907 | |
3908 | === modified file 'lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt' |
3909 | --- lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt 2010-10-06 18:53:53 +0000 |
3910 | +++ lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt 2010-10-20 01:49:43 +0000 |
3911 | @@ -74,8 +74,8 @@ |
3912 | Firstly, we appoint Sample Person as the driver for the distribution. |
3913 | |
3914 | >>> from canonical.database.sqlbase import flush_database_updates |
3915 | - >>> from canonical.launchpad.interfaces import ( |
3916 | - ... IDistributionSet, IPersonSet) |
3917 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
3918 | + >>> from lp.registry.interfaces.person import IPersonSet |
3919 | >>> from canonical.launchpad.ftests import login, logout |
3920 | >>> from zope.component import getUtility |
3921 | >>> login('foo.bar@canonical.com') |
3922 | |
3923 | === modified file 'lib/lp/bugs/stories/webservice/xx-bug.txt' |
3924 | --- lib/lp/bugs/stories/webservice/xx-bug.txt 2010-09-20 19:23:08 +0000 |
3925 | +++ lib/lp/bugs/stories/webservice/xx-bug.txt 2010-10-20 01:49:43 +0000 |
3926 | @@ -116,8 +116,8 @@ |
3927 | Activity is recorded and notifications are sent for newly created |
3928 | bugs. |
3929 | |
3930 | + >>> from lp.bugs.interfaces.bug import IBugSet |
3931 | >>> from lp.bugs.model.bugnotification import BugNotification |
3932 | - >>> from lp.bugs.interfaces.bug import IBugSet |
3933 | >>> from canonical.launchpad.ftests import ANONYMOUS, login, logout |
3934 | >>> from zope.component import getUtility |
3935 | |
3936 | |
3937 | === modified file 'lib/lp/bugs/tests/buglinktarget.txt' |
3938 | --- lib/lp/bugs/tests/buglinktarget.txt 2010-10-03 15:30:06 +0000 |
3939 | +++ lib/lp/bugs/tests/buglinktarget.txt 2010-10-20 01:49:43 +0000 |
3940 | @@ -16,8 +16,11 @@ |
3941 | # to a registered user. |
3942 | >>> login('no-priv@canonical.com') |
3943 | >>> from zope.interface.verify import verifyObject |
3944 | - >>> from canonical.launchpad.interfaces import ( |
3945 | - ... IBugLinkTarget, IBugLink, IBugSet) |
3946 | + >>> from lp.bugs.interfaces.bug import IBugSet |
3947 | + >>> from lp.bugs.interfaces.buglink import ( |
3948 | + ... IBugLink, |
3949 | + ... IBugLinkTarget, |
3950 | + ... ) |
3951 | |
3952 | >>> verifyObject(IBugLinkTarget, target) |
3953 | True |
3954 | |
3955 | === modified file 'lib/lp/bugs/tests/bugs-emailinterface.txt' |
3956 | --- lib/lp/bugs/tests/bugs-emailinterface.txt 2010-10-09 16:36:22 +0000 |
3957 | +++ lib/lp/bugs/tests/bugs-emailinterface.txt 2010-10-20 01:49:43 +0000 |
3958 | @@ -339,8 +339,7 @@ |
3959 | will provide IWeaklyAuthenticatedPrincipal. Let's mark the current |
3960 | principal with that. |
3961 | |
3962 | - >>> from canonical.launchpad.interfaces import ( |
3963 | - ... IWeaklyAuthenticatedPrincipal) |
3964 | + >>> from canonical.launchpad.interfaces.mail import IWeaklyAuthenticatedPrincipal |
3965 | >>> from zope.interface import directlyProvides, directlyProvidedBy |
3966 | >>> from zope.security.management import queryInteraction |
3967 | >>> participations = queryInteraction().participations |
3968 | @@ -1222,8 +1221,8 @@ |
3969 | bugs directly to series. |
3970 | |
3971 | >>> from canonical.config import config |
3972 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
3973 | >>> from canonical.testing.layers import LaunchpadZopelessLayer |
3974 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
3975 | |
3976 | # The script's default user doesn't have permission to change the driver. |
3977 | >>> commit() |
3978 | @@ -1648,8 +1647,8 @@ |
3979 | The user is a package bug supervisor |
3980 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3981 | |
3982 | - >>> from canonical.launchpad.interfaces import ( |
3983 | - ... IDistributionSet, ISourcePackageNameSet) |
3984 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
3985 | + >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
3986 | |
3987 | >>> commit() |
3988 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
3989 | @@ -2880,8 +2879,8 @@ |
3990 | >>> from lp.bugs.interfaces.bugtracker import BugTrackerType |
3991 | >>> from lp.bugs.tests.externalbugtracker import ( |
3992 | ... new_bugtracker) |
3993 | - >>> from canonical.launchpad.interfaces import ( |
3994 | - ... IBugWatchSet, IProductSet) |
3995 | + >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet |
3996 | + >>> from lp.registry.interfaces.product import IProductSet |
3997 | |
3998 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
3999 | >>> no_priv = getUtility(IPersonSet).getByName('no-priv') |
4000 | |
4001 | === modified file 'lib/lp/bugs/tests/bugtarget-questiontarget.txt' |
4002 | --- lib/lp/bugs/tests/bugtarget-questiontarget.txt 2010-10-09 16:36:22 +0000 |
4003 | +++ lib/lp/bugs/tests/bugtarget-questiontarget.txt 2010-10-20 01:49:43 +0000 |
4004 | @@ -13,8 +13,8 @@ |
4005 | Product, Distribution, ProductSeries, DistributionSeries, |
4006 | SourcePackage, or DistributionSourcePackages. |
4007 | |
4008 | - >>> from canonical.launchpad.interfaces import ( |
4009 | - ... IBugTarget, IQuestionTarget) |
4010 | + >>> from lp.answers.interfaces.questiontarget import IQuestionTarget |
4011 | + >>> from lp.bugs.interfaces.bugtarget import IBugTarget |
4012 | |
4013 | >>> login('foo.bar@canonical.com') |
4014 | >>> IBugTarget.providedBy(bugtarget) |
4015 | @@ -177,8 +177,9 @@ |
4016 | >>> big_bug = filebug( |
4017 | ... bugtarget, "Print is borked", status=BugTaskStatus.NEW) |
4018 | |
4019 | - >>> from canonical.launchpad.interfaces import ( |
4020 | - ... IBugTaskSet, IDistributionSet, ISourcePackageNameSet) |
4021 | + >>> from lp.bugs.interfaces.bugtask import IBugTaskSet |
4022 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
4023 | + >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
4024 | |
4025 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
4026 | >>> evo_ubuntu = getUtility(ISourcePackageNameSet)['evolution'] |
4027 | |
4028 | === modified file 'lib/lp/code/doc/branch-merge-proposal-notifications.txt' |
4029 | --- lib/lp/code/doc/branch-merge-proposal-notifications.txt 2010-05-27 02:04:21 +0000 |
4030 | +++ lib/lp/code/doc/branch-merge-proposal-notifications.txt 2010-10-20 01:49:43 +0000 |
4031 | @@ -9,8 +9,8 @@ |
4032 | When subscribers subscribe to branches, they can specify what level of |
4033 | notification they would like to receive. |
4034 | |
4035 | + >>> from zope.security.proxy import removeSecurityProxy |
4036 | >>> from difflib import unified_diff |
4037 | - >>> from zope.security.proxy import removeSecurityProxy |
4038 | >>> from lp.code.enums import ( |
4039 | ... BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel, |
4040 | ... CodeReviewNotificationLevel) |
4041 | |
4042 | === modified file 'lib/lp/code/doc/branch-visibility.txt' |
4043 | --- lib/lp/code/doc/branch-visibility.txt 2010-10-03 15:30:06 +0000 |
4044 | +++ lib/lp/code/doc/branch-visibility.txt 2010-10-20 01:49:43 +0000 |
4045 | @@ -60,8 +60,8 @@ |
4046 | AccessBranch authorization class is used to authorize users for the |
4047 | combination of the launchpad.View permission and the IBranch interface. |
4048 | |
4049 | + >>> from zope.component import getAdapter |
4050 | >>> from canonical.launchpad.webapp.interfaces import IAuthorization |
4051 | - >>> from zope.component import getAdapter |
4052 | >>> getAdapter(branch, IAuthorization, name='launchpad.View') |
4053 | <canonical.launchpad.security.AccessBranch ...> |
4054 | |
4055 | |
4056 | === modified file 'lib/lp/code/doc/codeimport-event.txt' |
4057 | --- lib/lp/code/doc/codeimport-event.txt 2010-10-03 15:30:06 +0000 |
4058 | +++ lib/lp/code/doc/codeimport-event.txt 2010-10-20 01:49:43 +0000 |
4059 | @@ -19,8 +19,8 @@ |
4060 | ICodeImportEventSet utility. |
4061 | |
4062 | >>> from zope.component import getUtility |
4063 | + >>> from zope.security.proxy import removeSecurityProxy |
4064 | >>> from canonical.launchpad.webapp.testing import verifyObject |
4065 | - >>> from zope.security.proxy import removeSecurityProxy |
4066 | >>> from lp.code.interfaces.codeimportevent import ICodeImportEventSet |
4067 | >>> event_set = getUtility(ICodeImportEventSet) |
4068 | >>> verifyObject(ICodeImportEventSet, removeSecurityProxy(event_set)) |
4069 | |
4070 | === modified file 'lib/lp/code/doc/codeimport-job.txt' |
4071 | --- lib/lp/code/doc/codeimport-job.txt 2009-06-12 16:36:02 +0000 |
4072 | +++ lib/lp/code/doc/codeimport-job.txt 2010-10-20 01:49:43 +0000 |
4073 | @@ -49,8 +49,8 @@ |
4074 | |
4075 | There are two CodeImport objects of interest in the sample data. |
4076 | |
4077 | - >>> from lp.code.interfaces.codeimport import ICodeImportSet |
4078 | >>> from lp.code.interfaces.branchlookup import IBranchLookup |
4079 | + >>> from lp.code.interfaces.codeimport import ICodeImportSet |
4080 | >>> branch_lookup = getUtility(IBranchLookup) |
4081 | >>> code_import_set = getUtility(ICodeImportSet) |
4082 | |
4083 | |
4084 | === modified file 'lib/lp/code/doc/codeimport.txt' |
4085 | --- lib/lp/code/doc/codeimport.txt 2010-10-03 15:30:06 +0000 |
4086 | +++ lib/lp/code/doc/codeimport.txt 2010-10-20 01:49:43 +0000 |
4087 | @@ -23,9 +23,9 @@ |
4088 | |
4089 | >>> from lp.code.interfaces.branchtarget import IBranchTarget |
4090 | >>> from lp.code.interfaces.codeimport import ICodeImport, ICodeImportSet |
4091 | - >>> from canonical.launchpad.webapp.testing import verifyObject |
4092 | >>> from zope.component import getUtility |
4093 | >>> from zope.security.proxy import removeSecurityProxy |
4094 | + >>> from canonical.launchpad.webapp.testing import verifyObject |
4095 | >>> code_import_set = getUtility(ICodeImportSet) |
4096 | >>> verifyObject(ICodeImportSet, removeSecurityProxy(code_import_set)) |
4097 | True |
4098 | @@ -341,8 +341,8 @@ |
4099 | There is a separate default update interval for each version control system, |
4100 | set in the Launchpad configuration system. |
4101 | |
4102 | + >>> from canonical.config import config |
4103 | >>> from datetime import timedelta |
4104 | - >>> from canonical.config import config |
4105 | >>> default_interval_cvs = timedelta( |
4106 | ... seconds=config.codeimport.default_interval_cvs) |
4107 | >>> default_interval_subversion = timedelta( |
4108 | |
4109 | === modified file 'lib/lp/code/stories/branches/xx-branch-deletion.txt' |
4110 | --- lib/lp/code/stories/branches/xx-branch-deletion.txt 2010-09-28 19:25:54 +0000 |
4111 | +++ lib/lp/code/stories/branches/xx-branch-deletion.txt 2010-10-20 01:49:43 +0000 |
4112 | @@ -94,8 +94,8 @@ |
4113 | >>> from zope.security.proxy import removeSecurityProxy |
4114 | >>> from canonical.launchpad.interfaces.launchpad import ( |
4115 | ... ILaunchpadCelebrities) |
4116 | + >>> from lp.registry.interfaces.person import IPersonSet |
4117 | >>> from lp.registry.interfaces.pocket import PackagePublishingPocket |
4118 | - >>> from lp.registry.interfaces.person import IPersonSet |
4119 | >>> login(ANONYMOUS) |
4120 | >>> ubuntu_branches = getUtility(ILaunchpadCelebrities).ubuntu_branches |
4121 | >>> ignored = removeSecurityProxy(ubuntu_branches).addMember( |
4122 | |
4123 | === modified file 'lib/lp/code/stories/branches/xx-branch-index.txt' |
4124 | --- lib/lp/code/stories/branches/xx-branch-index.txt 2010-09-27 19:39:21 +0000 |
4125 | +++ lib/lp/code/stories/branches/xx-branch-index.txt 2010-10-20 01:49:43 +0000 |
4126 | @@ -4,13 +4,13 @@ |
4127 | Imports used later in the document: |
4128 | |
4129 | >>> import pytz |
4130 | - >>> from datetime import datetime |
4131 | >>> from zope.component import getUtility |
4132 | >>> from canonical.database.sqlbase import flush_database_updates |
4133 | + >>> from datetime import datetime |
4134 | >>> from lp.code.enums import BranchType |
4135 | >>> from lp.code.bzr import BranchFormat, RepositoryFormat |
4136 | + >>> from lp.code.interfaces.branchlookup import IBranchLookup |
4137 | >>> from lp.registry.interfaces.person import IPersonSet |
4138 | - >>> from lp.code.interfaces.branchlookup import IBranchLookup |
4139 | |
4140 | Modifying/creating test data for this test case. |
4141 | |
4142 | |
4143 | === modified file 'lib/lp/code/stories/branches/xx-branchmergeproposal-listings.txt' |
4144 | --- lib/lp/code/stories/branches/xx-branchmergeproposal-listings.txt 2010-10-19 14:09:17 +0000 |
4145 | +++ lib/lp/code/stories/branches/xx-branchmergeproposal-listings.txt 2010-10-20 01:49:43 +0000 |
4146 | @@ -40,8 +40,8 @@ |
4147 | >>> proposal = branch.addLandingTarget(bob, trunk) |
4148 | >>> proposal.requestReview() |
4149 | >>> # Ensure the date_created is later to ensure stable ordering. |
4150 | + >>> from zope.security.proxy import removeSecurityProxy |
4151 | >>> from datetime import timedelta |
4152 | - >>> from zope.security.proxy import removeSecurityProxy |
4153 | >>> removeSecurityProxy(proposal).date_created += timedelta(1) |
4154 | |
4155 | >>> branch = factory.makeProductBranch( |
4156 | |
4157 | === modified file 'lib/lp/code/stories/branches/xx-branchmergeproposals.txt' |
4158 | --- lib/lp/code/stories/branches/xx-branchmergeproposals.txt 2010-09-15 06:02:12 +0000 |
4159 | +++ lib/lp/code/stories/branches/xx-branchmergeproposals.txt 2010-10-20 01:49:43 +0000 |
4160 | @@ -11,8 +11,8 @@ |
4161 | >>> from zope.component import getUtility |
4162 | >>> from lp.code.enums import ( |
4163 | ... BranchSubscriptionNotificationLevel, CodeReviewNotificationLevel) |
4164 | + >>> from lp.code.interfaces.branchlookup import IBranchLookup |
4165 | >>> from lp.registry.interfaces.person import IPersonSet |
4166 | - >>> from lp.code.interfaces.branchlookup import IBranchLookup |
4167 | >>> subscriber = getUtility(IPersonSet).getByEmail( |
4168 | ... 'foo.bar@canonical.com') |
4169 | >>> branch = getUtility(IBranchLookup).getByUniqueName( |
4170 | @@ -601,8 +601,8 @@ |
4171 | |
4172 | >>> login('admin@canonical.com') |
4173 | >>> from zope.security.proxy import removeSecurityProxy |
4174 | + >>> from difflib import unified_diff |
4175 | >>> from lp.code.model.diff import PreviewDiff |
4176 | - >>> from difflib import unified_diff |
4177 | >>> diff_text = ''.join( |
4178 | ... unified_diff('', ['Fake Diff' + u'\u1010'.encode('utf-8')])) |
4179 | >>> preview_diff = PreviewDiff.create(diff_text, u'a', u'b', None, u'') |
4180 | |
4181 | === modified file 'lib/lp/code/stories/branches/xx-creating-branches.txt' |
4182 | --- lib/lp/code/stories/branches/xx-creating-branches.txt 2010-09-28 20:57:34 +0000 |
4183 | +++ lib/lp/code/stories/branches/xx-creating-branches.txt 2010-10-20 01:49:43 +0000 |
4184 | @@ -15,9 +15,9 @@ |
4185 | |
4186 | Hosted branches use Launchpad as their primary location. |
4187 | |
4188 | + >>> from zope.component import getUtility |
4189 | + >>> from lp.code.enums import BranchType |
4190 | >>> from lp.registry.interfaces.product import IProductSet |
4191 | - >>> from lp.code.enums import BranchType |
4192 | - >>> from zope.component import getUtility |
4193 | >>> login(ANONYMOUS) |
4194 | >>> redfish = getUtility(IProductSet).getByName('redfish') |
4195 | >>> branch = factory.makeProductBranch( |
4196 | |
4197 | === modified file 'lib/lp/code/stories/branches/xx-private-branch-listings.txt' |
4198 | --- lib/lp/code/stories/branches/xx-private-branch-listings.txt 2010-09-22 20:13:42 +0000 |
4199 | +++ lib/lp/code/stories/branches/xx-private-branch-listings.txt 2010-10-20 01:49:43 +0000 |
4200 | @@ -22,8 +22,8 @@ |
4201 | Adding a private branch that is only visible by No Privileges Person |
4202 | (and Launchpad administrators). |
4203 | |
4204 | + >>> from zope.component import getUtility |
4205 | >>> from canonical.database.sqlbase import flush_database_updates |
4206 | - >>> from zope.component import getUtility |
4207 | >>> from lp.code.enums import BranchType |
4208 | >>> from lp.registry.interfaces.person import IPersonSet |
4209 | >>> from lp.registry.interfaces.product import IProductSet |
4210 | |
4211 | === modified file 'lib/lp/code/stories/codeimport/xx-failing-codeimport.txt' |
4212 | --- lib/lp/code/stories/codeimport/xx-failing-codeimport.txt 2010-03-18 15:39:58 +0000 |
4213 | +++ lib/lp/code/stories/codeimport/xx-failing-codeimport.txt 2010-10-20 01:49:43 +0000 |
4214 | @@ -6,8 +6,8 @@ |
4215 | >>> login('admin@canonical.com') |
4216 | >>> from canonical.launchpad.testing.codeimporthelpers import ( |
4217 | ... make_finished_import) |
4218 | + >>> from canonical.config import config |
4219 | >>> from lp.code.interfaces.codeimportresult import CodeImportResultStatus |
4220 | - >>> from canonical.config import config |
4221 | >>> product = factory.makeProduct(name='imported') |
4222 | >>> owner = factory.makePerson(name='import-owner') |
4223 | >>> code_import = factory.makeProductCodeImport( |
4224 | |
4225 | === modified file 'lib/lp/code/stories/feeds/xx-revision-atom.txt' |
4226 | --- lib/lp/code/stories/feeds/xx-revision-atom.txt 2009-12-24 01:41:54 +0000 |
4227 | +++ lib/lp/code/stories/feeds/xx-revision-atom.txt 2010-10-20 01:49:43 +0000 |
4228 | @@ -55,8 +55,8 @@ |
4229 | >>> login_person(mike) |
4230 | >>> team = factory.makeTeam(mike, 'The M Team', name='m-team') |
4231 | >>> ignored = team.addMember(mary, mike) |
4232 | + >>> from zope.component import getUtility |
4233 | >>> from lp.code.interfaces.revision import IRevisionSet |
4234 | - >>> from zope.component import getUtility |
4235 | >>> revision_set = getUtility(IRevisionSet) |
4236 | >>> revision_set.updateRevisionCacheForBranch(fooey_branch) |
4237 | >>> revision_set.updateRevisionCacheForBranch(fooix_branch) |
4238 | |
4239 | === modified file 'lib/lp/code/stories/webservice/xx-branch.txt' |
4240 | --- lib/lp/code/stories/webservice/xx-branch.txt 2010-04-09 01:30:22 +0000 |
4241 | +++ lib/lp/code/stories/webservice/xx-branch.txt 2010-10-20 01:49:43 +0000 |
4242 | @@ -11,8 +11,8 @@ |
4243 | >>> import pytz |
4244 | >>> from zope.security.proxy import removeSecurityProxy |
4245 | >>> from lp.code.enums import BranchLifecycleStatus, BranchType |
4246 | + >>> from lazr.restful.marshallers import DateTimeFieldMarshaller |
4247 | >>> from lp.code.interfaces.branch import IBranch |
4248 | - >>> from lazr.restful.marshallers import DateTimeFieldMarshaller |
4249 | |
4250 | To make this document a little more readable, we'll have to define some |
4251 | helpers. This one turns a JSON date/time response into a Python |
4252 | |
4253 | === modified file 'lib/lp/coop/answersbugs/stories/question-buglink.txt' |
4254 | --- lib/lp/coop/answersbugs/stories/question-buglink.txt 2010-10-11 16:17:45 +0000 |
4255 | +++ lib/lp/coop/answersbugs/stories/question-buglink.txt 2010-10-20 01:49:43 +0000 |
4256 | @@ -98,9 +98,9 @@ |
4257 | # This should use a private bug in our sample data. |
4258 | >>> from zope.component import getUtility |
4259 | >>> from canonical.launchpad.ftests import login, logout |
4260 | + >>> from canonical.database.sqlbase import flush_database_updates |
4261 | >>> from canonical.launchpad.webapp.interfaces import ILaunchBag |
4262 | >>> from lp.bugs.interfaces.bug import IBugSet |
4263 | - >>> from canonical.database.sqlbase import flush_database_updates |
4264 | >>> login('foo.bar@canonical.com') |
4265 | >>> private_bug = getUtility(IBugSet).get(6) |
4266 | >>> private_bug.setPrivate(True, getUtility(ILaunchBag).user) |
4267 | |
4268 | === modified file 'lib/lp/coop/answersbugs/tests/notifications-linked-bug.txt' |
4269 | --- lib/lp/coop/answersbugs/tests/notifications-linked-bug.txt 2010-10-10 15:39:28 +0000 |
4270 | +++ lib/lp/coop/answersbugs/tests/notifications-linked-bug.txt 2010-10-20 01:49:43 +0000 |
4271 | @@ -5,10 +5,10 @@ |
4272 | |
4273 | >>> from zope.event import notify |
4274 | >>> from zope.interface import providedBy |
4275 | + >>> from lazr.lifecycle.event import ObjectModifiedEvent |
4276 | + >>> from lazr.lifecycle.snapshot import Snapshot |
4277 | >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
4278 | >>> from lp.registry.interfaces.person import IPersonSet |
4279 | - >>> from lazr.lifecycle.event import ObjectModifiedEvent |
4280 | - >>> from lazr.lifecycle.snapshot import Snapshot |
4281 | |
4282 | >>> no_priv = getUtility(IPersonSet).getByName('no-priv') |
4283 | >>> bugtask = get_bugtask_linked_to_question() |
4284 | |
4285 | === modified file 'lib/lp/hardwaredb/doc/hwdb-device-tables.txt' |
4286 | --- lib/lp/hardwaredb/doc/hwdb-device-tables.txt 2010-10-10 15:39:28 +0000 |
4287 | +++ lib/lp/hardwaredb/doc/hwdb-device-tables.txt 2010-10-20 01:49:43 +0000 |
4288 | @@ -2342,9 +2342,11 @@ |
4289 | Instead of passing a seqence of bug IDs, we can also specify one or |
4290 | more bug tags. |
4291 | |
4292 | - >>> from canonical.launchpad.interfaces import ( |
4293 | - ... BugTaskSearchParams, IBugTaskSet) |
4294 | >>> from canonical.launchpad.searchbuilder import any |
4295 | + >>> from lp.bugs.interfaces.bugtask import ( |
4296 | + ... BugTaskSearchParams, |
4297 | + ... IBugTaskSet, |
4298 | + ... ) |
4299 | |
4300 | >>> bugtask_set = getUtility(IBugTaskSet) |
4301 | >>> bugtasks = bugtask_set.search( |
4302 | |
4303 | === modified file 'lib/lp/hardwaredb/doc/hwdb-submission.txt' |
4304 | --- lib/lp/hardwaredb/doc/hwdb-submission.txt 2010-10-09 16:36:22 +0000 |
4305 | +++ lib/lp/hardwaredb/doc/hwdb-submission.txt 2010-10-20 01:49:43 +0000 |
4306 | @@ -21,8 +21,8 @@ |
4307 | * submission_data: An XML file containing the collected data. This file is |
4308 | simply stored as a Librarian file, and parsed later by a cron job. |
4309 | |
4310 | + >>> from zope.component import getUtility |
4311 | >>> from StringIO import StringIO |
4312 | - >>> from zope.component import getUtility |
4313 | >>> from lp.hardwaredb.interfaces.hwdb import IHWDBApplication |
4314 | >>> data = StringIO('some data.') |
4315 | >>> data.filename = 'hardware-info' |
4316 | |
4317 | === modified file 'lib/lp/hardwaredb/doc/hwdb.txt' |
4318 | --- lib/lp/hardwaredb/doc/hwdb.txt 2010-10-18 03:00:11 +0000 |
4319 | +++ lib/lp/hardwaredb/doc/hwdb.txt 2010-10-20 01:49:43 +0000 |
4320 | @@ -118,8 +118,8 @@ |
4321 | The system fingerprint is stored in a separate table, HWSystemFingerprint. |
4322 | IHWSystemFingerPrintSet.createFingerprint creates a new row in this table. |
4323 | |
4324 | + >>> from lp.hardwaredb.interfaces.hwdb import IHWSystemFingerprintSet |
4325 | >>> from storm.store import Store |
4326 | - >>> from lp.hardwaredb.interfaces.hwdb import IHWSystemFingerprintSet |
4327 | >>> hw_fingerprint_set = getUtility(IHWSystemFingerprintSet) |
4328 | >>> fp = hw_fingerprint_set.createFingerprint(u'IBM T41') |
4329 | >>> fp.fingerprint |
4330 | @@ -153,10 +153,12 @@ |
4331 | HWSubmission table. |
4332 | |
4333 | >>> import pytz |
4334 | + >>> from StringIO import StringIO |
4335 | >>> from datetime import datetime |
4336 | - >>> from StringIO import StringIO |
4337 | - >>> from canonical.launchpad.interfaces import ( |
4338 | - ... HWSubmissionFormat, IHWSubmissionSet) |
4339 | + >>> from lp.hardwaredb.interfaces.hwdb import ( |
4340 | + ... HWSubmissionFormat, |
4341 | + ... IHWSubmissionSet, |
4342 | + ... ) |
4343 | >>> date_created = datetime(2007, 04, 01, tzinfo=pytz.timezone('UTC')) |
4344 | >>> date_submitted = datetime(2007, 04, 02, tzinfo=pytz.timezone('UTC')) |
4345 | >>> submission_data = 'submission data' |
4346 | @@ -366,8 +368,8 @@ |
4347 | When an anonymous submitter later registers a Launchpad account, the field |
4348 | `owner` is updated. |
4349 | |
4350 | - >>> from canonical.launchpad.interfaces import ( |
4351 | - ... IEmailAddressSet, PersonCreationRationale) |
4352 | + >>> from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet |
4353 | + >>> from lp.registry.interfaces.person import PersonCreationRationale |
4354 | >>> user = getUtility(IPersonSet).ensurePerson( |
4355 | ... u'beeblebrox@example.com', u'Beeblebrox', |
4356 | ... PersonCreationRationale.OWNER_CREATED_LAUNCHPAD) |
4357 | |
4358 | === modified file 'lib/lp/registry/browser/tests/coc-views.txt' |
4359 | --- lib/lp/registry/browser/tests/coc-views.txt 2010-04-12 20:26:24 +0000 |
4360 | +++ lib/lp/registry/browser/tests/coc-views.txt 2010-10-20 01:49:43 +0000 |
4361 | @@ -28,8 +28,8 @@ |
4362 | ... print '%s. %s' % ((index+1), extract_text(li)) |
4363 | >>> user = factory.makePerson() |
4364 | >>> login_person(user) |
4365 | + >>> from lp.registry.interfaces.codeofconduct import ICodeOfConductSet |
4366 | >>> from lp.registry.interfaces.person import IPersonSet |
4367 | - >>> from lp.registry.interfaces.codeofconduct import ICodeOfConductSet |
4368 | >>> from canonical.launchpad.testing.pages import ( |
4369 | ... extract_text, find_tag_by_id) |
4370 | >>> coc_set = getUtility(ICodeOfConductSet) |
4371 | |
4372 | === modified file 'lib/lp/registry/browser/tests/milestone-views.txt' |
4373 | --- lib/lp/registry/browser/tests/milestone-views.txt 2010-08-04 13:51:19 +0000 |
4374 | +++ lib/lp/registry/browser/tests/milestone-views.txt 2010-10-20 01:49:43 +0000 |
4375 | @@ -37,8 +37,8 @@ |
4376 | The MilestoneView used can be adapted to a MilestoneInlineNavigationMenu |
4377 | for use with inline presentation of milestones. |
4378 | |
4379 | + >>> from canonical.launchpad.webapp.interfaces import INavigationMenu |
4380 | >>> from canonical.lazr.canonicalurl import nearest_adapter |
4381 | - >>> from canonical.launchpad.webapp.interfaces import INavigationMenu |
4382 | |
4383 | >>> view = create_view(milestone, name='+productseries-table-row') |
4384 | >>> nearest_adapter(view, INavigationMenu, name='overview') |
4385 | @@ -330,8 +330,8 @@ |
4386 | The MilestoneEditView is responsible for controlling the fields that the |
4387 | user may edit. |
4388 | |
4389 | + >>> from canonical.launchpad.webapp.authorization import check_permission |
4390 | >>> from lp.registry.interfaces.product import IProductSet |
4391 | - >>> from canonical.launchpad.webapp.authorization import check_permission |
4392 | |
4393 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
4394 | >>> login_person(firefox.owner) |
4395 | |
4396 | === modified file 'lib/lp/registry/browser/tests/peoplemerge-views.txt' |
4397 | --- lib/lp/registry/browser/tests/peoplemerge-views.txt 2010-10-09 16:36:22 +0000 |
4398 | +++ lib/lp/registry/browser/tests/peoplemerge-views.txt 2010-10-20 01:49:43 +0000 |
4399 | @@ -9,8 +9,8 @@ |
4400 | Create a member of the registry team that is not a member of the admins |
4401 | team. |
4402 | |
4403 | + >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
4404 | >>> from lp.registry.interfaces.person import IPersonSet |
4405 | - >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
4406 | >>> registry_experts = getUtility(ILaunchpadCelebrities).registry_experts |
4407 | >>> person_set = getUtility(IPersonSet) |
4408 | >>> registry_expert= factory.makeRegistryExpert() |
4409 | |
4410 | === modified file 'lib/lp/registry/browser/tests/person-admin-views.txt' |
4411 | --- lib/lp/registry/browser/tests/person-admin-views.txt 2010-10-09 16:36:22 +0000 |
4412 | +++ lib/lp/registry/browser/tests/person-admin-views.txt 2010-10-20 01:49:43 +0000 |
4413 | @@ -3,8 +3,8 @@ |
4414 | Admistrators can access a subset of any IPerson's fields from the UI. |
4415 | The PersonAdministerView is registered under the +review name. |
4416 | |
4417 | + >>> from canonical.launchpad.webapp.authorization import check_permission |
4418 | >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag |
4419 | - >>> from canonical.launchpad.webapp.authorization import check_permission |
4420 | |
4421 | >>> login('foo.bar@canonical.com') |
4422 | >>> admin = getUtility(IOpenLaunchBag).user |
4423 | |
4424 | === modified file 'lib/lp/registry/browser/tests/person-views.txt' |
4425 | --- lib/lp/registry/browser/tests/person-views.txt 2010-10-09 16:36:22 +0000 |
4426 | +++ lib/lp/registry/browser/tests/person-views.txt 2010-10-20 01:49:43 +0000 |
4427 | @@ -330,8 +330,7 @@ |
4428 | Assigned specifications that do not display when they are not in an in |
4429 | progress state. |
4430 | |
4431 | - >>> from canonical.launchpad.interfaces import ( |
4432 | - ... SpecificationImplementationStatus) |
4433 | + >>> from lp.blueprints.interfaces.specification import SpecificationImplementationStatus |
4434 | |
4435 | >>> login(user.preferredemail.email) |
4436 | >>> product = factory.makeProduct(name="tool", owner=user) |
4437 | @@ -352,8 +351,7 @@ |
4438 | specifications is a link to show all the specifications that the user is |
4439 | working on. |
4440 | |
4441 | - >>> from canonical.launchpad.interfaces import ( |
4442 | - ... SpecificationDefinitionStatus) |
4443 | + >>> from lp.blueprints.interfaces.specification import SpecificationDefinitionStatus |
4444 | |
4445 | >>> spec.definition_status = SpecificationDefinitionStatus.APPROVED |
4446 | >>> newstate = spec.updateLifecycleStatus(user) |
4447 | |
4448 | === modified file 'lib/lp/registry/browser/tests/pillar-views.txt' |
4449 | --- lib/lp/registry/browser/tests/pillar-views.txt 2010-10-07 12:13:38 +0000 |
4450 | +++ lib/lp/registry/browser/tests/pillar-views.txt 2010-10-20 01:49:43 +0000 |
4451 | @@ -255,8 +255,8 @@ |
4452 | |
4453 | The pillar involvement view uses the InvolvedMenu when rendering links. |
4454 | |
4455 | + >>> from lp.app.browser.tales import MenuAPI |
4456 | >>> from operator import attrgetter |
4457 | - >>> from lp.app.browser.tales import MenuAPI |
4458 | |
4459 | The menu when viewed from a product page. |
4460 | |
4461 | @@ -271,8 +271,8 @@ |
4462 | http://code.launchpad.dev/bread/+addbranch |
4463 | http://blueprints.launchpad.dev/bread/+addspec |
4464 | |
4465 | + >>> from lp.registry.browser.pillar import InvolvedMenu |
4466 | >>> from lp.testing.menu import check_menu_links |
4467 | - >>> from lp.registry.browser.pillar import InvolvedMenu |
4468 | >>> check_menu_links(InvolvedMenu(product)) |
4469 | True |
4470 | |
4471 | |
4472 | === modified file 'lib/lp/registry/browser/tests/poll-views_0.txt' |
4473 | --- lib/lp/registry/browser/tests/poll-views_0.txt 2010-10-14 18:42:19 +0000 |
4474 | +++ lib/lp/registry/browser/tests/poll-views_0.txt 2010-10-20 01:49:43 +0000 |
4475 | @@ -3,10 +3,10 @@ |
4476 | First import some stuff and setup some things we'll use in this test. |
4477 | |
4478 | >>> from zope.component import getUtility, getMultiAdapter |
4479 | + >>> from zope.publisher.browser import TestRequest |
4480 | + >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
4481 | >>> from lp.registry.interfaces.person import IPersonSet |
4482 | >>> from lp.registry.interfaces.poll import IPollSet |
4483 | - >>> from zope.publisher.browser import TestRequest |
4484 | - >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
4485 | >>> from datetime import datetime, timedelta |
4486 | >>> login("test@canonical.com") |
4487 | >>> ubuntu_team = getUtility(IPersonSet).getByName('ubuntu-team') |
4488 | |
4489 | === modified file 'lib/lp/registry/browser/tests/private-team-creation-views.txt' |
4490 | --- lib/lp/registry/browser/tests/private-team-creation-views.txt 2010-08-23 16:51:11 +0000 |
4491 | +++ lib/lp/registry/browser/tests/private-team-creation-views.txt 2010-10-20 01:49:43 +0000 |
4492 | @@ -7,8 +7,10 @@ |
4493 | |
4494 | Unprivileged users do not see the visibility widget. |
4495 | |
4496 | - >>> from lp.registry.interfaces.person import IPersonSet |
4497 | - >>> from lp.registry.interfaces.person import PersonVisibility |
4498 | + >>> from lp.registry.interfaces.person import ( |
4499 | + ... IPersonSet, |
4500 | + ... PersonVisibility, |
4501 | + ... ) |
4502 | >>> personset = getUtility(IPersonSet) |
4503 | >>> nopriv = personset.getByEmail('no-priv@canonical.com') |
4504 | >>> login('no-priv@canonical.com') |
4505 | |
4506 | === modified file 'lib/lp/registry/browser/tests/product-portlet-packages-view.txt' |
4507 | --- lib/lp/registry/browser/tests/product-portlet-packages-view.txt 2010-08-24 15:29:01 +0000 |
4508 | +++ lib/lp/registry/browser/tests/product-portlet-packages-view.txt 2010-10-20 01:49:43 +0000 |
4509 | @@ -8,8 +8,10 @@ |
4510 | Create a helper to update the distribution source package cache, which |
4511 | does not happen automatically. |
4512 | |
4513 | - >>> from canonical.launchpad.testing.pages import find_tag_by_id |
4514 | - >>> from canonical.launchpad.testing.pages import extract_text |
4515 | + >>> from canonical.launchpad.testing.pages import ( |
4516 | + ... extract_text, |
4517 | + ... find_tag_by_id, |
4518 | + ... ) |
4519 | >>> from canonical.launchpad.interfaces.launchpad import ( |
4520 | ... ILaunchpadCelebrities) |
4521 | >>> from lp.registry.interfaces.product import IProductSet |
4522 | @@ -19,8 +21,8 @@ |
4523 | >>> import transaction |
4524 | >>> from canonical.launchpad.scripts import QuietFakeLogger |
4525 | >>> logger = QuietFakeLogger() |
4526 | + >>> from canonical.config import config |
4527 | >>> from canonical.testing.layers import reconnect_stores |
4528 | - >>> from canonical.config import config |
4529 | >>> def updateCache(): |
4530 | ... # Switch to the statistician user who is the only user with |
4531 | ... # write permission to the source package cache tables. |
4532 | |
4533 | === modified file 'lib/lp/registry/browser/tests/product-views.txt' |
4534 | --- lib/lp/registry/browser/tests/product-views.txt 2010-09-01 19:42:24 +0000 |
4535 | +++ lib/lp/registry/browser/tests/product-views.txt 2010-10-20 01:49:43 +0000 |
4536 | @@ -20,10 +20,10 @@ |
4537 | for the project is returned. If the product has no project or the |
4538 | project has no driver then None is returned. |
4539 | |
4540 | + >>> from canonical.launchpad.ftests import ANONYMOUS |
4541 | + >>> from lp.registry.interfaces.person import IPersonSet |
4542 | >>> from lp.registry.interfaces.product import IProductSet |
4543 | >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet |
4544 | - >>> from lp.registry.interfaces.person import IPersonSet |
4545 | - >>> from canonical.launchpad.ftests import ANONYMOUS |
4546 | >>> login('foo.bar@canonical.com') |
4547 | >>> mozilla = getUtility(IProjectGroupSet).getByName('mozilla') |
4548 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
4549 | |
4550 | === modified file 'lib/lp/registry/browser/tests/team-views.txt' |
4551 | --- lib/lp/registry/browser/tests/team-views.txt 2010-10-03 15:30:06 +0000 |
4552 | +++ lib/lp/registry/browser/tests/team-views.txt 2010-10-20 01:49:43 +0000 |
4553 | @@ -2,9 +2,9 @@ |
4554 | |
4555 | == Home page == |
4556 | |
4557 | - >>> from canonical.launchpad.interfaces import ( |
4558 | - ... IPersonSet, ITeamMembershipSet) |
4559 | >>> from zope.component import getMultiAdapter |
4560 | + >>> from lp.registry.interfaces.person import IPersonSet |
4561 | + >>> from lp.registry.interfaces.teammembership import ITeamMembershipSet |
4562 | >>> person_set = getUtility(IPersonSet) |
4563 | |
4564 | On a team home page, we show up to the latest five members who were approved |
4565 | |
4566 | === modified file 'lib/lp/registry/doc/announcement.txt' |
4567 | --- lib/lp/registry/doc/announcement.txt 2010-10-09 16:36:22 +0000 |
4568 | +++ lib/lp/registry/doc/announcement.txt 2010-10-20 01:49:43 +0000 |
4569 | @@ -13,8 +13,10 @@ |
4570 | >>> import pytz |
4571 | >>> NOW = datetime.utcnow().replace(tzinfo=pytz.utc) |
4572 | >>> FUTURE = NOW + timedelta(days=10) |
4573 | - >>> from canonical.launchpad.interfaces import ( |
4574 | - ... IAnnouncementSet, IDistributionSet, IProductSet, IProjectGroupSet) |
4575 | + >>> from lp.registry.interfaces.announcement import IAnnouncementSet |
4576 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
4577 | + >>> from lp.registry.interfaces.product import IProductSet |
4578 | + >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet |
4579 | >>> announcements = getUtility(IAnnouncementSet) |
4580 | >>> kubuntu = getUtility(IDistributionSet).getByName('kubuntu') |
4581 | >>> apache = getUtility(IProjectGroupSet).getByName('apache') |
4582 | |
4583 | === modified file 'lib/lp/registry/doc/commercialsubscription.txt' |
4584 | --- lib/lp/registry/doc/commercialsubscription.txt 2010-10-09 16:36:22 +0000 |
4585 | +++ lib/lp/registry/doc/commercialsubscription.txt 2010-10-20 01:49:43 +0000 |
4586 | @@ -7,8 +7,8 @@ |
4587 | |
4588 | >>> from zope.component import getUtility |
4589 | >>> from canonical.launchpad.webapp.testing import verifyObject |
4590 | - >>> from canonical.launchpad.interfaces import ( |
4591 | - ... ICommercialSubscription, IProductSet) |
4592 | + >>> from lp.registry.interfaces.commercialsubscription import ICommercialSubscription |
4593 | + >>> from lp.registry.interfaces.product import IProductSet |
4594 | >>> from canonical.launchpad.ftests import login, ANONYMOUS |
4595 | >>> login('no-priv@canonical.com') |
4596 | |
4597 | |
4598 | === modified file 'lib/lp/registry/doc/distribution-mirror.txt' |
4599 | --- lib/lp/registry/doc/distribution-mirror.txt 2010-10-09 16:36:22 +0000 |
4600 | +++ lib/lp/registry/doc/distribution-mirror.txt 2010-10-20 01:49:43 +0000 |
4601 | @@ -5,12 +5,20 @@ |
4602 | |
4603 | >>> from datetime import datetime, timedelta |
4604 | >>> from zope.component import getUtility |
4605 | - >>> from canonical.launchpad.interfaces import ( |
4606 | - ... ICountrySet, IDistributionSet, IDistributionMirrorSet, |
4607 | - ... IDistroArchSeriesSet, IDistroSeriesSet, ILibraryFileAliasSet, |
4608 | - ... IPersonSet, MirrorContent, MirrorSpeed, MirrorStatus) |
4609 | + >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
4610 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
4611 | + >>> from lp.registry.interfaces.distributionmirror import ( |
4612 | + ... IDistributionMirrorSet, |
4613 | + ... MirrorContent, |
4614 | + ... MirrorSpeed, |
4615 | + ... MirrorStatus, |
4616 | + ... ) |
4617 | + >>> from lp.registry.interfaces.distroseries import IDistroSeriesSet |
4618 | + >>> from lp.registry.interfaces.person import IPersonSet |
4619 | + >>> from lp.registry.interfaces.pocket import PackagePublishingPocket |
4620 | >>> from lp.registry.interfaces.series import SeriesStatus |
4621 | - >>> from lp.registry.interfaces.pocket import PackagePublishingPocket |
4622 | + >>> from lp.services.worlddata.interfaces.country import ICountrySet |
4623 | + >>> from lp.soyuz.interfaces.distroarchseries import IDistroArchSeriesSet |
4624 | >>> mirrorset = getUtility(IDistributionMirrorSet) |
4625 | >>> distroset = getUtility(IDistributionSet) |
4626 | >>> ubuntu = distroset.get(1) |
4627 | |
4628 | === modified file 'lib/lp/registry/doc/distribution-sourcepackage.txt' |
4629 | --- lib/lp/registry/doc/distribution-sourcepackage.txt 2010-10-04 19:50:45 +0000 |
4630 | +++ lib/lp/registry/doc/distribution-sourcepackage.txt 2010-10-20 01:49:43 +0000 |
4631 | @@ -16,8 +16,8 @@ |
4632 | |
4633 | >>> from zope.component import getUtility |
4634 | >>> from canonical.launchpad.webapp.testing import verifyObject |
4635 | - >>> from canonical.launchpad.interfaces import ( |
4636 | - ... IDistributionSet, IDistributionSourcePackage) |
4637 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
4638 | + >>> from lp.registry.interfaces.distributionsourcepackage import IDistributionSourcePackage |
4639 | >>> debian = getUtility(IDistributionSet).getByName("debian") |
4640 | >>> ubuntu = getUtility(IDistributionSet).getByName("ubuntu") |
4641 | |
4642 | @@ -87,8 +87,8 @@ |
4643 | sorted by distroseries and component with publications in proposed and backports |
4644 | excluded. |
4645 | |
4646 | - >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher |
4647 | >>> from lp.soyuz.enums import PackagePublishingStatus |
4648 | + >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher |
4649 | >>> publisher = SoyuzTestPublisher() |
4650 | >>> publisher.prepareBreezyAutotest() |
4651 | >>> warty = ubuntu['warty'] |
4652 | |
4653 | === modified file 'lib/lp/registry/doc/distribution.txt' |
4654 | --- lib/lp/registry/doc/distribution.txt 2010-10-09 16:36:22 +0000 |
4655 | +++ lib/lp/registry/doc/distribution.txt 2010-10-20 01:49:43 +0000 |
4656 | @@ -70,9 +70,8 @@ |
4657 | |
4658 | >>> from lp.registry.model.sourcepackagename import ( |
4659 | ... SourcePackageName) |
4660 | - >>> from canonical.launchpad.interfaces import ( |
4661 | - ... IDistributionSourcePackage, |
4662 | - ... IDistributionSourcePackageRelease) |
4663 | + >>> from lp.registry.interfaces.distributionsourcepackage import IDistributionSourcePackage |
4664 | + >>> from lp.soyuz.interfaces.distributionsourcepackagerelease import IDistributionSourcePackageRelease |
4665 | |
4666 | >>> evo = SourcePackageName.byName("evolution") |
4667 | >>> evo_ubuntu = ubuntu.getSourcePackage(evo) |
4668 | @@ -571,9 +570,7 @@ |
4669 | |
4670 | We can get only valid specs (those that are not obsolete or superseded): |
4671 | |
4672 | - >>> from canonical.launchpad.interfaces import ( |
4673 | - ... SpecificationDefinitionStatus, |
4674 | - ... ) |
4675 | + >>> from lp.blueprints.interfaces.specification import SpecificationDefinitionStatus |
4676 | >>> login('mark@example.com') |
4677 | >>> for spec in kubuntu.specifications(): |
4678 | ... # Do this here, otherwise, the change will be flush before |
4679 | |
4680 | === modified file 'lib/lp/registry/doc/distroseries.txt' |
4681 | --- lib/lp/registry/doc/distroseries.txt 2010-10-09 16:36:22 +0000 |
4682 | +++ lib/lp/registry/doc/distroseries.txt 2010-10-20 01:49:43 +0000 |
4683 | @@ -22,8 +22,11 @@ |
4684 | >>> from zope.component import getUtility |
4685 | >>> from canonical.database.sqlbase import flush_database_updates |
4686 | >>> from canonical.launchpad.webapp.testing import verifyObject |
4687 | - >>> from canonical.launchpad.interfaces import ( |
4688 | - ... IDistroSeries, IDistroSeriesSet, IDistributionSet) |
4689 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
4690 | + >>> from lp.registry.interfaces.distroseries import ( |
4691 | + ... IDistroSeries, |
4692 | + ... IDistroSeriesSet, |
4693 | + ... ) |
4694 | >>> from lp.translations.interfaces.translationimportqueue import ( |
4695 | ... IHasTranslationImports) |
4696 | >>> distroseriesset = getUtility(IDistroSeriesSet) |
4697 | @@ -247,8 +250,8 @@ |
4698 | devel |
4699 | translations |
4700 | |
4701 | - >>> from canonical.launchpad.interfaces import ( |
4702 | - ... IComponentSet, ISectionSet) |
4703 | + >>> from lp.soyuz.interfaces.component import IComponentSet |
4704 | + >>> from lp.soyuz.interfaces.section import ISectionSet |
4705 | >>> python = getUtility(ISectionSet).ensure('python') |
4706 | |
4707 | >>> hoary.addSection(python) |
4708 | @@ -502,10 +505,9 @@ |
4709 | DistroSeries can build meta objects for packages |
4710 | ------------------------------------------------ |
4711 | |
4712 | - >>> from canonical.launchpad.interfaces import ( |
4713 | - ... ISourcePackage, |
4714 | - ... IDistroSeriesBinaryPackage, |
4715 | - ... IDistroSeriesSourcePackageRelease) |
4716 | + >>> from lp.registry.interfaces.sourcepackage import ISourcePackage |
4717 | + >>> from lp.soyuz.interfaces.distroseriesbinarypackage import IDistroSeriesBinaryPackage |
4718 | + >>> from lp.soyuz.interfaces.distroseriessourcepackagerelease import IDistroSeriesSourcePackageRelease |
4719 | |
4720 | >>> pmount_src_name = SourcePackageName.byName('pmount') |
4721 | >>> pmount_source = hoary.getSourcePackage(pmount_src_name) |
4722 | @@ -709,8 +711,7 @@ |
4723 | 4 |
4724 | >>> warty_mozilla_pub_bin = warty_mozilla_pub_binaries[0] |
4725 | |
4726 | - >>> from canonical.launchpad.interfaces import ( |
4727 | - ... IBinaryPackagePublishingHistory) |
4728 | + >>> from lp.soyuz.interfaces.publishing import IBinaryPackagePublishingHistory |
4729 | >>> verifyObject(IBinaryPackagePublishingHistory, warty_mozilla_pub_bin) |
4730 | True |
4731 | |
4732 | |
4733 | === modified file 'lib/lp/registry/doc/entitlement.txt' |
4734 | --- lib/lp/registry/doc/entitlement.txt 2010-10-09 16:36:22 +0000 |
4735 | +++ lib/lp/registry/doc/entitlement.txt 2010-10-20 01:49:43 +0000 |
4736 | @@ -7,12 +7,17 @@ |
4737 | |
4738 | >>> from datetime import datetime |
4739 | >>> import pytz |
4740 | + >>> from canonical.database.sqlbase import flush_database_updates |
4741 | + >>> from canonical.launchpad.ftests import login |
4742 | >>> from canonical.launchpad.webapp.testing import verifyObject |
4743 | - >>> from canonical.launchpad.interfaces import ( |
4744 | - ... EntitlementQuota, EntitlementState, EntitlementType, |
4745 | - ... IEntitlement, IEntitlementSet, IPersonSet) |
4746 | - >>> from canonical.launchpad.ftests import login |
4747 | - >>> from canonical.database.sqlbase import flush_database_updates |
4748 | + >>> from lp.registry.interfaces.entitlement import ( |
4749 | + ... EntitlementQuota, |
4750 | + ... EntitlementState, |
4751 | + ... EntitlementType, |
4752 | + ... IEntitlement, |
4753 | + ... IEntitlementSet, |
4754 | + ... ) |
4755 | + >>> from lp.registry.interfaces.person import IPersonSet |
4756 | |
4757 | The logged in user must be an admin in order to change the quota. |
4758 | |
4759 | |
4760 | === modified file 'lib/lp/registry/doc/featuredproject.txt' |
4761 | --- lib/lp/registry/doc/featuredproject.txt 2010-10-03 15:30:06 +0000 |
4762 | +++ lib/lp/registry/doc/featuredproject.txt 2010-10-20 01:49:43 +0000 |
4763 | @@ -6,9 +6,10 @@ |
4764 | projects is stored in the FeaturedProject table, and managed through the |
4765 | PillarNameSet. |
4766 | |
4767 | - >>> from canonical.launchpad.interfaces import ( |
4768 | - ... IDistributionSet, IPillarNameSet, IProductSet, IProjectGroupSet |
4769 | - ... ) |
4770 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
4771 | + >>> from lp.registry.interfaces.pillar import IPillarNameSet |
4772 | + >>> from lp.registry.interfaces.product import IProductSet |
4773 | + >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet |
4774 | >>> pillar_set = getUtility(IPillarNameSet) |
4775 | >>> def isFeatured(project): |
4776 | ... return project in getUtility(IPillarNameSet).featured_projects |
4777 | |
4778 | === modified file 'lib/lp/registry/doc/gpg-signatures.txt' |
4779 | --- lib/lp/registry/doc/gpg-signatures.txt 2010-10-09 16:36:22 +0000 |
4780 | +++ lib/lp/registry/doc/gpg-signatures.txt 2010-10-20 01:49:43 +0000 |
4781 | @@ -19,8 +19,8 @@ |
4782 | >>> bag.user.name |
4783 | u'name12' |
4784 | |
4785 | + >>> from zope.component import getUtility |
4786 | >>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler |
4787 | - >>> from zope.component import getUtility |
4788 | >>> gpghandler = getUtility(IGPGHandler) |
4789 | |
4790 | The text below was "clear signed" by 0xDFD20543 master key: |
4791 | |
4792 | === modified file 'lib/lp/registry/doc/gpgkey.txt' |
4793 | --- lib/lp/registry/doc/gpgkey.txt 2010-10-03 15:30:06 +0000 |
4794 | +++ lib/lp/registry/doc/gpgkey.txt 2010-10-20 01:49:43 +0000 |
4795 | @@ -3,8 +3,11 @@ |
4796 | Launchpad models GPG keys in a GPGKey class. |
4797 | |
4798 | >>> from zope.component import getUtility |
4799 | - >>> from canonical.launchpad.interfaces import ( |
4800 | - ... IGPGKeySet, IPersonSet, GPGKeyAlgorithm) |
4801 | + >>> from lp.registry.interfaces.gpg import ( |
4802 | + ... GPGKeyAlgorithm, |
4803 | + ... IGPGKeySet, |
4804 | + ... ) |
4805 | + >>> from lp.registry.interfaces.person import IPersonSet |
4806 | >>> personset = getUtility(IPersonSet) |
4807 | >>> foobar = personset.getByName('name16') |
4808 | >>> gpgkeyset = getUtility(IGPGKeySet) |
4809 | |
4810 | === modified file 'lib/lp/registry/doc/irc.txt' |
4811 | --- lib/lp/registry/doc/irc.txt 2009-06-30 16:51:21 +0000 |
4812 | +++ lib/lp/registry/doc/irc.txt 2010-10-20 01:49:43 +0000 |
4813 | @@ -3,8 +3,8 @@ |
4814 | IRC IDs are associated with a person and must be created through the |
4815 | IIrcIDSet utility. |
4816 | |
4817 | + >>> from lp.registry.interfaces.person import IPersonSet |
4818 | >>> from lp.registry.interfaces.role import IHasOwner |
4819 | - >>> from lp.registry.interfaces.person import IPersonSet |
4820 | >>> from lp.registry.interfaces.irc import IIrcID, IIrcIDSet |
4821 | |
4822 | The new() method of IIrcIDSet takes the person who will be associated |
4823 | |
4824 | === modified file 'lib/lp/registry/doc/jabber.txt' |
4825 | --- lib/lp/registry/doc/jabber.txt 2009-06-30 16:51:21 +0000 |
4826 | +++ lib/lp/registry/doc/jabber.txt 2010-10-20 01:49:43 +0000 |
4827 | @@ -3,8 +3,8 @@ |
4828 | Jabber IDs are associated with a person and must be created through the |
4829 | IJabberIDSet utility. |
4830 | |
4831 | + >>> from lp.registry.interfaces.person import IPersonSet |
4832 | >>> from lp.registry.interfaces.role import IHasOwner |
4833 | - >>> from lp.registry.interfaces.person import IPersonSet |
4834 | >>> from lp.registry.interfaces.jabber import ( |
4835 | ... IJabberID, IJabberIDSet) |
4836 | |
4837 | |
4838 | === modified file 'lib/lp/registry/doc/karmacache.txt' |
4839 | --- lib/lp/registry/doc/karmacache.txt 2010-10-04 19:50:45 +0000 |
4840 | +++ lib/lp/registry/doc/karmacache.txt 2010-10-20 01:49:43 +0000 |
4841 | @@ -9,10 +9,10 @@ |
4842 | which runs daily. The script does that by using the IKarmaCacheManager API. |
4843 | |
4844 | >>> from zope.component import getUtility |
4845 | + >>> from canonical.testing.layers import LaunchpadZopelessLayer |
4846 | + >>> from lp.registry.interfaces.karma import IKarmaCacheManager |
4847 | + >>> from lp.registry.interfaces.person import IPersonSet |
4848 | >>> from lp.registry.model.karma import KarmaCategory |
4849 | - >>> from canonical.launchpad.interfaces import ( |
4850 | - ... IKarmaCacheManager, IPersonSet) |
4851 | - >>> from canonical.testing.layers import LaunchpadZopelessLayer |
4852 | |
4853 | >>> LaunchpadZopelessLayer.switchDbUser('karma') |
4854 | >>> karmacachemanager = getUtility(IKarmaCacheManager) |
4855 | |
4856 | === modified file 'lib/lp/registry/doc/karmacontext.txt' |
4857 | --- lib/lp/registry/doc/karmacontext.txt 2010-10-03 15:30:06 +0000 |
4858 | +++ lib/lp/registry/doc/karmacontext.txt 2010-10-20 01:49:43 +0000 |
4859 | @@ -10,8 +10,10 @@ |
4860 | >>> import operator |
4861 | >>> from zope.component import getUtility |
4862 | >>> from canonical.launchpad.webapp.testing import verifyObject |
4863 | - >>> from canonical.launchpad.interfaces import ( |
4864 | - ... IPersonSet, IProductSet, IDistributionSet, IKarmaContext) |
4865 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
4866 | + >>> from lp.registry.interfaces.karma import IKarmaContext |
4867 | + >>> from lp.registry.interfaces.person import IPersonSet |
4868 | + >>> from lp.registry.interfaces.product import IProductSet |
4869 | >>> salgado = getUtility(IPersonSet).getByName('salgado') |
4870 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
4871 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
4872 | |
4873 | === modified file 'lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt' |
4874 | --- lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt 2010-10-09 16:36:22 +0000 |
4875 | +++ lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt 2010-10-20 01:49:43 +0000 |
4876 | @@ -290,9 +290,9 @@ |
4877 | itself is private, so is its archive, and then messages are not sent to the |
4878 | archiver email address. |
4879 | |
4880 | + >>> from zope.component import queryAdapter |
4881 | + >>> from canonical.lazr.interfaces.objectprivacy import IObjectPrivacy |
4882 | >>> from lp.registry.interfaces.person import PersonVisibility |
4883 | - >>> from canonical.lazr.interfaces.objectprivacy import IObjectPrivacy |
4884 | - >>> from zope.component import queryAdapter |
4885 | >>> team_three = new_team('team-three') |
4886 | >>> queryAdapter(team_three, IObjectPrivacy).is_private |
4887 | False |
4888 | |
4889 | === modified file 'lib/lp/registry/doc/mailinglists.txt' |
4890 | --- lib/lp/registry/doc/mailinglists.txt 2010-10-09 16:36:22 +0000 |
4891 | +++ lib/lp/registry/doc/mailinglists.txt 2010-10-20 01:49:43 +0000 |
4892 | @@ -7,8 +7,10 @@ |
4893 | an existing team. This is done through an IMailingListSet utility. |
4894 | |
4895 | >>> from canonical.launchpad.webapp.testing import verifyObject |
4896 | - >>> from canonical.launchpad.interfaces import ( |
4897 | - ... IMailingList, IMailingListSet) |
4898 | + >>> from lp.registry.interfaces.mailinglist import ( |
4899 | + ... IMailingList, |
4900 | + ... IMailingListSet, |
4901 | + ... ) |
4902 | >>> list_set = getUtility(IMailingListSet) |
4903 | >>> verifyObject(IMailingListSet, list_set) |
4904 | True |
4905 | @@ -414,9 +416,9 @@ |
4906 | subscription') will fire an instance of the ObjectModifiedEvent. |
4907 | |
4908 | # Register an event listener that will print event it receives. |
4909 | + >>> from canonical.launchpad.ftests.event import TestEventListener |
4910 | >>> from lazr.lifecycle.interfaces import IObjectModifiedEvent |
4911 | >>> from lp.registry.interfaces.mailinglist import IMailingList |
4912 | - >>> from canonical.launchpad.ftests.event import TestEventListener |
4913 | >>> def print_event(object, event): |
4914 | ... print "Received %s on %s" % ( |
4915 | ... event.__class__.__name__.split('.')[-1], |
4916 | |
4917 | === modified file 'lib/lp/registry/doc/mentoringoffer.txt' |
4918 | --- lib/lp/registry/doc/mentoringoffer.txt 2010-10-11 16:17:45 +0000 |
4919 | +++ lib/lp/registry/doc/mentoringoffer.txt 2010-10-20 01:49:43 +0000 |
4920 | @@ -6,8 +6,8 @@ |
4921 | specification. Here, Foo Bar will make an offer on a spec and a bug: |
4922 | |
4923 | >>> from lp.bugs.interfaces.bug import IBugSet |
4924 | + >>> from lp.registry.interfaces.distribution import IDistributionSet |
4925 | >>> from lp.registry.interfaces.person import IPersonSet |
4926 | - >>> from lp.registry.interfaces.distribution import IDistributionSet |
4927 | >>> from canonical.launchpad.ftests import login, syncUpdate |
4928 | >>> distroset = getUtility(IDistributionSet) |
4929 | >>> personset = getUtility(IPersonSet) |
4930 | @@ -86,8 +86,11 @@ |
4931 | show up there. |
4932 | |
4933 | >>> firefox = productset.getByName('firefox') |
4934 | - >>> from canonical.launchpad.interfaces import ( |
4935 | - ... BugTaskImportance, BugTaskStatus, IBugTaskSet) |
4936 | + >>> from lp.bugs.interfaces.bugtask import ( |
4937 | + ... BugTaskImportance, |
4938 | + ... BugTaskStatus, |
4939 | + ... IBugTaskSet, |
4940 | + ... ) |
4941 | >>> bugtaskset = getUtility(IBugTaskSet) |
4942 | >>> ff_task = bugtaskset.createTask( |
4943 | ... bug=bug2, product=firefox, owner=mark, |
4944 | @@ -201,8 +204,8 @@ |
4945 | |
4946 | When a spec or a bug is completed, it drops off the mentoring lists. |
4947 | |
4948 | - >>> from canonical.launchpad.interfaces import ( |
4949 | - ... BugTaskStatus, SpecificationImplementationStatus) |
4950 | + >>> from lp.blueprints.interfaces.specification import SpecificationImplementationStatus |
4951 | + >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
4952 | >>> bug2.is_complete |
4953 | False |
4954 | >>> from canonical.database.sqlbase import flush_database_updates |
4955 | |
4956 | === modified file 'lib/lp/registry/doc/message-holds.txt' |
4957 | --- lib/lp/registry/doc/message-holds.txt 2010-10-09 16:36:22 +0000 |
4958 | +++ lib/lp/registry/doc/message-holds.txt 2010-10-20 01:49:43 +0000 |
4959 | @@ -483,8 +483,8 @@ |
4960 | ... return self |
4961 | ... signature = object() |
4962 | |
4963 | + >>> from canonical.launchpad.mail.handlers import MaloneHandler |
4964 | >>> from email import message_from_string |
4965 | - >>> from canonical.launchpad.mail.handlers import MaloneHandler |
4966 | >>> malone_msg = message_from_string(message_text, _class=SignedMessage) |
4967 | |
4968 | # Tweak the Subject so we can tell the two message apart. |
4969 | |
4970 | === modified file 'lib/lp/registry/doc/milestone.txt' |
4971 | --- lib/lp/registry/doc/milestone.txt 2010-10-09 16:36:22 +0000 |
4972 | +++ lib/lp/registry/doc/milestone.txt 2010-10-20 01:49:43 +0000 |
4973 | @@ -287,12 +287,13 @@ |
4974 | |
4975 | >>> from lp.bugs.model.bugnotification import ( |
4976 | ... BugNotification) |
4977 | - >>> from canonical.launchpad.interfaces import ( |
4978 | - ... IBugSet, IPersonSet, IProductSet) |
4979 | + >>> from zope.event import notify |
4980 | + >>> from zope.interface import providedBy |
4981 | >>> from lazr.lifecycle.event import ObjectModifiedEvent |
4982 | >>> from lazr.lifecycle.snapshot import Snapshot |
4983 | - >>> from zope.event import notify |
4984 | - >>> from zope.interface import providedBy |
4985 | + >>> from lp.bugs.interfaces.bug import IBugSet |
4986 | + >>> from lp.registry.interfaces.person import IPersonSet |
4987 | + >>> from lp.registry.interfaces.product import IProductSet |
4988 | >>> firefox = getUtility(IProductSet).getByName('firefox') |
4989 | >>> firefox_trunk = firefox.getSeries('trunk') |
4990 | >>> [milestone_one] = [milestone |
4991 | @@ -519,8 +520,8 @@ |
4992 | committed status are updated to fix released. An ObjectModifiedEvent |
4993 | event is signaled for each changed bug task. |
4994 | |
4995 | + >>> from canonical.launchpad.ftests.event import TestEventListener |
4996 | >>> from lazr.lifecycle.interfaces import IObjectModifiedEvent |
4997 | - >>> from canonical.launchpad.ftests.event import TestEventListener |
4998 | >>> from lp.bugs.interfaces.bugtask import BugTaskStatus, IBugTask |
4999 | |
5000 | >>> def print_event(object, event): |
Some of the reformatted imports repeat the module name (e.g. lines 25-26). AIUI, this is because a script, rather than a person, did the conversion. Please investigate updating the script to do multiline imports instead.