launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #08403
lp:~wallyworld/launchpad/private-informationtype-description-1006520 into lp:launchpad
Ian Booth has proposed merging lp:~wallyworld/launchpad/private-informationtype-description-1006520 into lp:launchpad.
Requested reviews:
Ian Booth (wallyworld)
Related bugs:
Bug #1006520 in Launchpad itself: "Private information type description is redundant"
https://bugs.launchpad.net/launchpad/+bug/1006520
For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/private-informationtype-description-1006520/+merge/108127
== Implementation ==
Set the vocab item description directly to new text instead of using replace().
== Tests ==
Update test_information_type_vocabulary test_display_userdata_as_private() test.
== Lint ==
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/registry/vocabularies.py
lib/lp/registry/tests/test_information_type_vocabulary.py
--
https://code.launchpad.net/~wallyworld/launchpad/private-informationtype-description-1006520/+merge/108127
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/registry/tests/test_information_type_vocabulary.py'
--- lib/lp/registry/tests/test_information_type_vocabulary.py 2012-05-29 03:16:43 +0000
+++ lib/lp/registry/tests/test_information_type_vocabulary.py 2012-05-31 09:13:22 +0000
@@ -73,16 +73,16 @@
vocab = InformationTypeVocabulary()
term = vocab.getTermByToken('USERDATA')
self.assertEqual('Private', term.title)
- self.assertEqual(
- "Visible only to users with whom the project has shared "
- "information\ncontaining private information.\n",
+ self.assertTextMatchesExpressionIgnoreWhitespace(
+ "Visible only to users with whom the project has "
+ "shared private information.",
term.description)
def test_userdata(self):
vocab = InformationTypeVocabulary()
term = vocab.getTermByToken('USERDATA')
self.assertEqual('User Data', term.title)
- self.assertEqual(
+ self.assertTextMatchesExpressionIgnoreWhitespace(
"Visible only to users with whom the project has shared "
- "information\ncontaining user data.\n",
+ "information containing user data.",
term.description)
=== modified file 'lib/lp/registry/vocabularies.py'
--- lib/lp/registry/vocabularies.py 2012-05-29 03:16:43 +0000
+++ lib/lp/registry/vocabularies.py 2012-05-31 09:13:22 +0000
@@ -2254,7 +2254,8 @@
if type == InformationType.USERDATA and show_userdata_as_private:
title = 'Private'
description = (
- description.replace('user data', 'private information'))
+ 'Visible only to users with whom the project has '
+ 'shared private information.')
term = SimpleTerm(type, type.name, title)
term.name = type.name
term.description = description
Follow ups