← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/launchpad/recife-test-fixups into lp:~launchpad/launchpad/recife

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/recife-test-fixups into lp:~launchpad/launchpad/recife.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers): code


Some fixes for a couple of tests I broke with my previous work on the Recife feature branch.  I must have accidentally made a change after my final test run.  Naturally I ran a full EC2 test as well, and that turned up the failures.

The changes are all the same: LaunchpadObjectFactory.makeTranslationMessage produces a TranslationMessage that's current for the Ubuntu-side translations, but the other factory message set things up for upstream-side translation.

I fixed the breakage by replacing makeTranslationMessage calls with ones to makeCurrentTranslationMessage, which follows the new model and so makes the message current on the side appropriate for its context.


Jeroen

-- 
https://code.launchpad.net/~jtv/launchpad/recife-test-fixups/+merge/40980
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/recife-test-fixups into lp:~launchpad/launchpad/recife.
=== modified file 'lib/lp/translations/browser/tests/pofile-base-views.txt'
--- lib/lp/translations/browser/tests/pofile-base-views.txt	2010-11-04 09:32:28 +0000
+++ lib/lp/translations/browser/tests/pofile-base-views.txt	2010-11-16 16:59:18 +0000
@@ -52,7 +52,7 @@
 
     >>> contributor = factory.makePerson(displayname="Contri Butor")
     >>> potmsgset = factory.makePOTMsgSet(potemplate, sequence=1)
-    >>> translation = factory.makeTranslationMessage(pofile, potmsgset,
+    >>> translation = factory.makeCurrentTranslationMessage(pofile, potmsgset,
     ...     translator=contributor, reviewer=contributor,
     ...     translations=['A translation made by a contributor.'])
     >>> view = POFileBaseView(pofile, LaunchpadTestRequest())

=== modified file 'lib/lp/translations/browser/tests/test_translatablemessage_view.py'
--- lib/lp/translations/browser/tests/test_translatablemessage_view.py	2010-10-05 00:08:16 +0000
+++ lib/lp/translations/browser/tests/test_translatablemessage_view.py	2010-11-16 16:59:18 +0000
@@ -48,7 +48,7 @@
     def test_singular_message(self):
         # View information for a singular message.
         translator = self.factory.makePerson()
-        self.factory.makeTranslationMessage(
+        self.factory.makeCurrentTranslationMessage(
             self.pofile, self.potmsgset,
             translations=[u'foo'], translator=translator)
         view = self._create_view()
@@ -66,7 +66,7 @@
         # View information for a message with plural.
         self.potmsgset.updatePluralForm(u'English plural')
         translator = self.factory.makePerson()
-        self.factory.makeTranslationMessage(
+        self.factory.makeCurrentTranslationMessage(
             self.pofile, self.potmsgset,
             translations=[u'foo', u'bar'], translator=translator)
         view = self._create_view()
@@ -86,7 +86,7 @@
         TRANSLATION = u"foo \nbar"
         translator = self.factory.makePerson()
         self.potmsgset.updatePluralForm(u'English plural')
-        self.factory.makeTranslationMessage(
+        self.factory.makeCurrentTranslationMessage(
             self.pofile, self.potmsgset,
             translations=[TRANSLATION], translator=translator)
         view = self._create_view()