get_feedback_messages() callsites have highly repetitive code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Steve Kowalik |
Bug Description
In pagetests, get_feedback_
>>> for message in get_feedback_
... print message
or the equivalent
>>> messages = get_feedback_
>>> for msg in messages:
... print msg
or the slightly more acrobatic
>>> print "\n".join(
Very occasionally a test does something different, but not usefully so:
>>> get_feedback_
[u'Your choice has been saved. Your translations will be removed
once we completely switch to BSD license for translations.']
The only test I can see that actually does something different with the list is bug-also-
>>> print get_feedback_
To make tests easier to write and reduce redundancy, I suggest replacing get_feedback_
Related branches
- William Grant (community): Approve (code)
-
Diff: 3119 lines (+352/-581)85 files modifiedlib/lp/answers/stories/question-add.txt (+3/-6)
lib/lp/answers/stories/question-subscriptions.txt (+3/-6)
lib/lp/answers/stories/this-is-a-faq.txt (+1/-2)
lib/lp/app/stories/launchpad-root/site-search.txt (+1/-2)
lib/lp/blueprints/stories/standalone/xx-branch-links.txt (+1/-2)
lib/lp/bugs/stories/bug-also-affects/xx-also-affects-new-upstream.txt (+5/-3)
lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt (+45/-45)
lib/lp/bugs/stories/bug-also-affects/xx-duplicate-bugwatches.txt (+1/-2)
lib/lp/bugs/stories/bugs/xx-bug-comment-attach-file.txt (+11/-12)
lib/lp/bugs/stories/bugs/xx-bug-create-question.txt (+4/-4)
lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt (+13/-17)
lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt (+8/-16)
lib/lp/bugs/stories/guided-filebug/xx-distro-guided-filebug.txt (+1/-2)
lib/lp/bugs/stories/guided-filebug/xx-filebug-attachments.txt (+1/-2)
lib/lp/bugs/stories/guided-filebug/xx-product-guided-filebug.txt (+2/-4)
lib/lp/code/stories/branches/xx-branch-deletion.txt (+3/-6)
lib/lp/code/stories/branches/xx-branch-edit.txt (+3/-6)
lib/lp/code/stories/branches/xx-bug-branch-links.txt (+1/-2)
lib/lp/code/stories/branches/xx-subscribing-branches.txt (+1/-2)
lib/lp/code/stories/branches/xx-upgrading-branches.txt (+1/-2)
lib/lp/code/stories/codeimport/xx-admin-codeimport.txt (+9/-18)
lib/lp/code/stories/codeimport/xx-create-codeimport.txt (+7/-14)
lib/lp/code/stories/codeimport/xx-edit-codeimport.txt (+1/-2)
lib/lp/coop/answersbugs/stories/question-buglink.txt (+2/-4)
lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt (+9/-18)
lib/lp/registry/stories/mailinglists/hosted-email-address.txt (+2/-4)
lib/lp/registry/stories/mailinglists/lifecycle.txt (+2/-4)
lib/lp/registry/stories/mailinglists/subscriptions.txt (+5/-6)
lib/lp/registry/stories/milestone/object-milestones.txt (+2/-4)
lib/lp/registry/stories/milestone/xx-milestone-add-and-edit.txt (+1/-2)
lib/lp/registry/stories/object/xx-nameblacklist.txt (+1/-2)
lib/lp/registry/stories/person/xx-add-sshkey.txt (+7/-7)
lib/lp/registry/stories/person/xx-adminpeoplemerge.txt (+2/-2)
lib/lp/registry/stories/person/xx-deactivate-account.txt (+1/-2)
lib/lp/registry/stories/product/xx-product-edit-sourceforge-project.txt (+1/-2)
lib/lp/registry/stories/product/xx-product-files.txt (+18/-20)
lib/lp/registry/stories/product/xx-product-index.txt (+1/-2)
lib/lp/registry/stories/product/xx-product-package-pages.txt (+1/-2)
lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt (+4/-6)
lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt (+1/-2)
lib/lp/registry/stories/productseries/xx-productseries-delete.txt (+1/-2)
lib/lp/registry/stories/productseries/xx-productseries-set-branch.txt (+5/-10)
lib/lp/registry/stories/project/xx-project-add.txt (+3/-3)
lib/lp/registry/stories/team-polls/create-poll-options.txt (+6/-6)
lib/lp/registry/stories/team-polls/create-polls.txt (+4/-4)
lib/lp/registry/stories/team-polls/edit-options.txt (+1/-1)
lib/lp/registry/stories/team-polls/edit-poll.txt (+2/-2)
lib/lp/registry/stories/team-polls/vote-poll.txt (+1/-2)
lib/lp/registry/stories/team/xx-adminteammerge.txt (+2/-2)
lib/lp/registry/stories/team/xx-team-add-my-teams.txt (+7/-7)
lib/lp/registry/stories/team/xx-team-claim.txt (+2/-4)
lib/lp/registry/stories/team/xx-team-contactemail.txt (+2/-4)
lib/lp/registry/stories/teammembership/private-team.txt (+3/-6)
lib/lp/registry/stories/vouchers/xx-voucher-redemption.txt (+3/-6)
lib/lp/services/feeds/stories/xx-links.txt (+4/-4)
lib/lp/services/oauth/stories/managing-tokens.txt (+1/-2)
lib/lp/soyuz/stories/distroseries/add-architecture.txt (+1/-1)
lib/lp/soyuz/stories/ppa/xx-copy-packages.txt (+18/-54)
lib/lp/soyuz/stories/ppa/xx-delete-packages.txt (+5/-15)
lib/lp/soyuz/stories/ppa/xx-edit-dependencies.txt (+12/-37)
lib/lp/soyuz/stories/ppa/xx-ppa-private-teams.txt (+3/-4)
lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt (+12/-24)
lib/lp/soyuz/stories/ppa/xx-private-ppa-subscription-stories.txt (+5/-10)
lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt (+1/-2)
lib/lp/soyuz/stories/soyuz/xx-build-record.txt (+2/-4)
lib/lp/soyuz/stories/soyuz/xx-builder-page.txt (+5/-9)
lib/lp/soyuz/stories/soyuz/xx-distroarchseries.txt (+1/-2)
lib/lp/soyuz/stories/soyuz/xx-person-packages.txt (+1/-3)
lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt (+7/-14)
lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt (+6/-14)
lib/lp/testing/browser.py (+2/-2)
lib/lp/testing/doc/pagetest-helpers.txt (+8/-6)
lib/lp/testing/pages.py (+1/-2)
lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt (+1/-1)
lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt (+1/-4)
lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt (+4/-8)
lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt (+1/-1)
lib/lp/translations/stories/productseries/xx-productseries-translations-settings.txt (+1/-1)
lib/lp/translations/stories/standalone/xx-licensing.txt (+4/-4)
lib/lp/translations/stories/standalone/xx-pofile-details.txt (+6/-6)
lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt (+1/-2)
lib/lp/translations/stories/standalone/xx-pofile-translate.txt (+2/-4)
lib/lp/translations/stories/standalone/xx-potemplate-export.txt (+4/-8)
lib/lp/translations/stories/standalone/xx-product-export.txt (+1/-2)
lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt (+3/-6)
description: | updated |
visibility: | private → public |
Changed in launchpad-foundations: | |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Fixed in stable r16780 (http:// bazaar. launchpad. net/~launchpad- pqm/launchpad/ stable/ revision/ 16780) by a commit, but not testable.