Here is the incremental diffs wrt the previous review.
=== modified file 'lib/lp/translations/model/translationimportqueue.py'
--- lib/lp/translations/model/translationimportqueue.py 2009-11-17 09:50:33 +0000
+++ lib/lp/translations/model/translationimportqueue.py 2009-11-17 10:55:09 +0000
@@ -310,7 +310,7 @@
# that's only possible if we know where to import it
# (import_into not None).
return False
- if (new_status == RosettaImportStatus.BLOCKED and not can_admin):
+ if new_status == RosettaImportStatus.BLOCKED and not can_admin:
# Only administrators are able to set an entry to BLOCKED.
return False
if (new_status in (RosettaImportStatus.FAILED,
@@ -319,7 +319,7 @@
# Only scripts set these statuses and they report as a rosetta
# expert.
return False
- return (self.isUserUploaderOrOwner(user) or can_admin)
+ return self.isUserUploaderOrOwner(user) or can_admin
-class TestTranslationImpportQueueEntryStatus(TestCaseWithFactory):
+class TestTranslationImportQueueEntryStatus(TestCaseWithFactory):
"""Test handling of the status of a queue entry."""
layer = LaunchpadZopelessLayer
def setUp(self):
"""Set up context to test in."""
- super(TestTranslationImpportQueueEntryStatus, self).setUp()
+ super(TestTranslationImportQueueEntryStatus, self).setUp()
def test_canSetStatus_ubuntu_translation_group(self):
- # Owners of the Ubuntu translation Groups can set entries
+ # Owners of the Ubuntu translation Groups can set entries to approved
# that are targeted to Ubuntu. self._setUpUbuntu() ubuntu_entry = self.queue.addOrUpdateEntry(
Here is the incremental diffs wrt the previous review.
=== modified file 'lib/lp/ translations/ model/translati onimportqueue. py' translations/ model/translati onimportqueue. py 2009-11-17 09:50:33 +0000 translations/ model/translati onimportqueue. py 2009-11-17 10:55:09 +0000 atus.BLOCKED and not can_admin): atus.BLOCKED and not can_admin: tatus.FAILED, oaderOrOwner( user) or can_admin) aderOrOwner( user) or can_admin
--- lib/lp/
+++ lib/lp/
@@ -310,7 +310,7 @@
# that's only possible if we know where to import it
# (import_into not None).
return False
- if (new_status == RosettaImportSt
+ if new_status == RosettaImportSt
# Only administrators are able to set an entry to BLOCKED.
return False
if (new_status in (RosettaImportS
@@ -319,7 +319,7 @@
# Only scripts set these statuses and they report as a rosetta
# expert.
return False
- return (self.isUserUpl
+ return self.isUserUplo
def setStatus(self, new_status, user): portQueueEntry` ."""
"""See `ITranslationIm
=== modified file 'lib/lp/ translations/ tests/test_ translationimpo rtqueue. py' translations/ tests/test_ translationimpo rtqueue. py 2009-11-17 09:51:40 +0000 translations/ tests/test_ translationimpo rtqueue. py 2009-11-17 11:03:11 +0000 ssLayer
--- lib/lp/
+++ lib/lp/
@@ -17,14 +17,14 @@
from canonical.testing import LaunchpadZopele
-class TestTranslation ImpportQueueEnt ryStatus( TestCaseWithFac tory): ImportQueueEntr yStatus( TestCaseWithFac tory):
+class TestTranslation
"""Test handling of the status of a queue entry."""
layer = LaunchpadZopele ssLayer
def setUp(self): lationImpportQu eueEntryStatus, self).setUp() lationImportQue ueEntryStatus, self).setUp()
"""Set up context to test in."""
- super(TestTrans
+ super(TestTrans
self.queue = getUtility( ITranslationImp ortQueue)
self. rosetta_ experts = (
self. factory. makeTranslation Group(self. ubuntu_ group_owner) )
@@ -100,7 +100,7 @@
def test_canSetStat us_ubuntu_ translation_ group(self) :
self. _setUpUbuntu( )
ubuntu_ entry = self.queue. addOrUpdateEntr y(
- # Owners of the Ubuntu translation Groups can set entries
+ # Owners of the Ubuntu translation Groups can set entries to approved
# that are targeted to Ubuntu.