~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/tests/test_sourcepackagerelease.py

  • Committer: Stuart Bishop
  • Date: 2011-09-28 12:49:24 UTC
  • mfrom: (9893.10.1 trivial)
  • mto: This revision was merged to the branch mainline in revision 14178.
  • Revision ID: stuart.bishop@canonical.com-20110928124924-m5a22fymqghw6c5i
Merged trivial into distinct-db-users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2010 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2010-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
"""Test SourcePackageRelease."""
6
6
__metaclass__ = type
7
7
 
8
8
from textwrap import dedent
 
9
 
9
10
import transaction
10
11
from zope.component import getUtility
11
12
 
12
13
from canonical.testing.layers import (
13
 
    ZopelessDatabaseLayer,
14
14
    LaunchpadFunctionalLayer,
15
15
    LaunchpadZopelessLayer,
 
16
    ZopelessDatabaseLayer,
16
17
    )
17
18
from lp.buildmaster.enums import BuildStatus
18
 
from lp.registry.interfaces.pocket import (
19
 
    PackagePublishingPocket,
20
 
    )
 
19
from lp.registry.interfaces.pocket import PackagePublishingPocket
21
20
from lp.services.tarfile_helpers import LaunchpadWriteTarFile
22
 
from lp.soyuz.enums import (
23
 
    SourcePackageFormat,
24
 
    )
 
21
from lp.soyuz.enums import SourcePackageFormat
25
22
from lp.soyuz.interfaces.sourcepackageformat import (
26
23
    ISourcePackageFormatSelectionSet,
27
24
    )
28
25
from lp.soyuz.scripts.packagecopier import do_copy
29
26
from lp.testing import (
 
27
    person_logged_in,
30
28
    TestCaseWithFactory,
31
 
    person_logged_in,
32
29
    )
33
30
from lp.testing.dbuser import dbuser
34
31
from lp.translations.interfaces.translationimportqueue import (
52
49
 
53
50
    def test_uploader_recipe(self):
54
51
        recipe_build = self.factory.makeSourcePackageRecipeBuild()
55
 
        recipe = recipe_build.recipe
56
52
        spr = self.factory.makeSourcePackageRelease(
57
53
            source_package_recipe_build=recipe_build)
58
54
        self.assertEqual(recipe_build.requester, spr.uploader)
133
129
            das, PackagePublishingPocket.RELEASE, parent_archive,
134
130
            status=BuildStatus.FULLYBUILT)
135
131
        bpr = self.factory.makeBinaryPackageRelease(build=orig_build)
136
 
        parent_binary_pub = self.factory.makeBinaryPackagePublishingHistory(
 
132
        self.factory.makeBinaryPackagePublishingHistory(
137
133
            binarypackagerelease=bpr, distroarchseries=das,
138
134
            archive=parent_archive)
139
135