launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25320
[Merge] ~cjwatson/launchpad:py3-unicode-getUniqueString into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-unicode-getUniqueString into launchpad:master.
Commit message:
Simplify unicode(self.factory.getUniqueString())
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/391026
This makes more sense as just self.factory.getUniqueUnicode(), and is more Python-3-friendly.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-unicode-getUniqueString into launchpad:master.
diff --git a/lib/lp/code/mail/tests/test_branchmergeproposal.py b/lib/lp/code/mail/tests/test_branchmergeproposal.py
index 3a3e887..c6c0fdc 100644
--- a/lib/lp/code/mail/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/mail/tests/test_branchmergeproposal.py
@@ -77,8 +77,8 @@ class TestMergeProposalMailing(TestCaseWithFactory):
initial_comment=initial_comment, reviewer=reviewer)
if diff_text:
PreviewDiff.create(
- bmp, diff_text, unicode(self.factory.getUniqueString('revid')),
- unicode(self.factory.getUniqueString('revid')), None, None)
+ bmp, diff_text, self.factory.getUniqueUnicode('revid'),
+ self.factory.getUniqueUnicode('revid'), None, None)
transaction.commit()
subscriber = self.factory.makePerson(displayname='Baz Quxx',
email='baz.quxx@xxxxxxxxxxx')
@@ -442,8 +442,8 @@ class TestMergeProposalMailing(TestCaseWithFactory):
merge_proposal, providing=providedBy(merge_proposal))
merge_proposal.updatePreviewDiff(
''.join(unified_diff('', 'Fake diff')),
- unicode(self.factory.getUniqueString('revid')),
- unicode(self.factory.getUniqueString('revid')))
+ self.factory.getUniqueUnicode('revid'),
+ self.factory.getUniqueUnicode('revid'))
event = ObjectModifiedEvent(
merge_proposal, old_merge_proposal, [], merge_proposal.registrant)
merge_proposal_modified(merge_proposal, event)
diff --git a/lib/lp/soyuz/tests/test_build_depwait.py b/lib/lp/soyuz/tests/test_build_depwait.py
index c961dd4..83b9186 100644
--- a/lib/lp/soyuz/tests/test_build_depwait.py
+++ b/lib/lp/soyuz/tests/test_build_depwait.py
@@ -56,12 +56,11 @@ class TestBuildDepWait(TestCaseWithFactory):
version="%s.1" % self.factory.getUniqueInteger(),
distroseries=self.distroseries, archive=self.archive)
[build] = spph.createMissingBuilds()
- spn = self.factory.getUniqueString()
+ spn = self.factory.getUniqueUnicode()
version = "%s.1" % self.factory.getUniqueInteger()
with person_logged_in(self.admin):
build.updateStatus(
- BuildStatus.MANUALDEPWAIT,
- slave_status={'dependencies': unicode(spn)})
+ BuildStatus.MANUALDEPWAIT, slave_status={'dependencies': spn})
[bpph] = self.publisher.getPubBinaries(
binaryname=spn, distroseries=self.distroseries,
version=version, builder=self.builder, archive=self.archive,
@@ -79,12 +78,11 @@ class TestBuildDepWait(TestCaseWithFactory):
version="%s.1" % self.factory.getUniqueInteger(),
distroseries=self.distroseries, archive=self.archive)
[build] = spph.createMissingBuilds()
- spn = self.factory.getUniqueString()
+ spn = self.factory.getUniqueUnicode()
version = "%s.1" % self.factory.getUniqueInteger()
with person_logged_in(self.admin):
build.updateStatus(
- BuildStatus.MANUALDEPWAIT,
- slave_status={'dependencies': unicode(spn)})
+ BuildStatus.MANUALDEPWAIT,slave_status={'dependencies': spn})
[bpph] = self.publisher.getPubBinaries(
binaryname=spn, distroseries=self.distroseries,
version=version, builder=self.builder, archive=self.archive,
@@ -94,7 +92,7 @@ class TestBuildDepWait(TestCaseWithFactory):
transaction.commit()
build.updateDependencies()
# Since the dependency is in universe, we still can't see it.
- self.assertEqual(unicode(spn), build.dependencies)
+ self.assertEqual(spn, build.dependencies)
with person_logged_in(self.admin):
bpph.component = getUtility(IComponentSet)['main']
transaction.commit()