~gary/launchpad/prodprepbuildout

« back to all changes in this revision

Viewing changes to lib/lp/translations/tests/test_translatablemessage.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2010-03-09 16:31:11 UTC
  • mfrom: (9072.1.6 max-heat-from-context)
  • Revision ID: launchpad@pqm.canonical.com-20100309163111-2n17zsb7myoz34kf
[release-critical=flacoste][r=abel][ui=none][bug=531443] In bug
        listings, use the current context, rather than the bugtask target,
        to determine the maximum bug heat to use.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
"""Unit tests for `TranslatableMessage`."""
7
7
 
8
8
from datetime import datetime, timedelta
9
9
import pytz
 
10
import transaction
10
11
from unittest import TestLoader
11
12
 
12
13
from lp.testing import TestCaseWithFactory
147
148
        self.message = TranslatableMessage(self.potmsgset, self.pofile)
148
149
 
149
150
    def test_getExternalTranslations(self):
 
151
        transaction.commit()
150
152
        externals = self.message.getExternalTranslations()
151
153
        self.assertContentEqual([self.external_current], externals)
152
154
 
153
155
    def test_getExternalSuggestions(self):
 
156
        transaction.commit()
154
157
        externals = self.message.getExternalSuggestions()
155
158
        self.assertContentEqual([self.external_suggestion], externals)
156
159