Merge lp:~jtv/launchpad/recife-test-fixup into lp:~launchpad/launchpad/recife

Proposed by Jeroen T. Vermeulen on 2010-07-05
Status: Merged
Approved by: Aaron Bentley on 2010-07-05
Approved revision: no longer in the source branch.
Merged at revision: 9141
Proposed branch: lp:~jtv/launchpad/recife-test-fixup
Merge into: lp:~launchpad/launchpad/recife
Diff against target: 30 lines (+8/-4)
1 file modified
lib/lp/translations/tests/test_helpers.py (+8/-4)
To merge this branch: bzr merge lp:~jtv/launchpad/recife-test-fixup
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve on 2010-07-05
Canonical Launchpad Engineering code 2010-07-05 Pending
Review via email: mp+29216@code.launchpad.net

Commit Message

Recife test fixup.

Description of the Change

= Recife test fix =

This fixes a test of some new test helpers. I broke the test with a "harmless" change during review, and apparently managed not to run it.

(Recife is a feature branch, so EC2 is no help in this case).

Test with:
{{{
./bin/test -vv -m lp.translations.tests.test_helpers
}}}

Q/A consists of ensuring that the test passes. No lint apart from the usual "make lint" madness.

Jeroen

To post a comment you must log in.
Aaron Bentley (abentley) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/translations/tests/test_helpers.py'
2--- lib/lp/translations/tests/test_helpers.py 2010-07-02 13:00:56 +0000
3+++ lib/lp/translations/tests/test_helpers.py 2010-07-05 16:11:31 +0000
4@@ -159,18 +159,22 @@
5 self.assertIs(None, other)
6 self.assertEquals([tm_diverged], divergences)
7
8- def test_summarize_current_translations_multiple_divergences_elswh(self):
9+ def test_summarize_current_translations_multiple_divergences_elsewh(self):
10+ # summarize_current_translations when there are diverged
11+ # messages on both the Ubuntu side and the upstream side.
12 tm_diverged1 = make_translationmessage(
13 self.factory, pofile=self.other_pofile, potmsgset=self.potmsgset,
14 ubuntu=True, upstream=False, diverged=True)
15
16+ ubuntu = self.pofile.potemplate.distroseries.distribution
17 potemplate2 = self.factory.makePOTemplate(
18- productseries=self.factory.makeProductSeries(
19- product=self.pofile.potemplate.productseries.product))
20+ distroseries=self.factory.makeDistroSeries(distribution=ubuntu),
21+ sourcepackagename=self.pofile.potemplate.sourcepackagename)
22 pofile2 = self.factory.makePOFile(
23 self.pofile.language.code, potemplate=potemplate2)
24 tm_diverged2 = make_translationmessage(
25- self.factory, pofile=pofile2, potmsgset=self.potmsgset)
26+ self.factory, pofile=pofile2, potmsgset=self.potmsgset,
27+ ubuntu=False, upstream=True, diverged=True)
28
29 current_shared, current_diverged, other, divergences = (
30 summarize_current_translations(self.pofile, self.potmsgset))

Subscribers

People subscribed via source and target branches