~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

[r=allenap][no-qa] Get rid of factory.make[Ubuntu]DistroRelease. And
        some lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 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 translation import queue auto-approval.
327
327
    def _setUpDistro(self):
328
328
        """Set up a `Distribution` with two templates."""
329
329
        self.distro = self.factory.makeDistribution()
330
 
        self.distroseries = self.factory.makeDistroRelease(
 
330
        self.distroseries = self.factory.makeDistroSeries(
331
331
            distribution=self.distro)
332
332
        self.packagename = SourcePackageNameSet().new('package')
333
333
        self.from_packagename = SourcePackageNameSet().new('from')
367
367
        # getPOTemplateByPathAndOrigin disregards templates from other
368
368
        # distroseries.
369
369
        self._setUpDistro()
370
 
        other_series = self.factory.makeDistroRelease(
 
370
        other_series = self.factory.makeDistroSeries(
371
371
            distribution=self.distro)
372
372
        self._makeTemplateForDistroSeries(other_series, 'test1')
373
373
        self.distrotemplate1.iscurrent = False
679
679
        super(TestKdePOFileGuess, self).setUp()
680
680
        self.queue = TranslationImportQueue()
681
681
 
682
 
        self.distroseries = self.factory.makeDistroRelease()
 
682
        self.distroseries = self.factory.makeDistroSeries()
683
683
 
684
684
        # For each of KDE3 and KDE4, set up:
685
685
        #  a translation package following that KDE's naming pattern,