launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #30756
Re: [Merge] ~xnox/launchpad:snap-request-builds-mimick-auto into launchpad:master
Call out duplicate login, in the browser test.
Diff comments:
> diff --git a/lib/lp/snappy/browser/tests/test_snap.py b/lib/lp/snappy/browser/tests/test_snap.py
> index 2de0693..3b11e7c 100644
> --- a/lib/lp/snappy/browser/tests/test_snap.py
> +++ b/lib/lp/snappy/browser/tests/test_snap.py
> @@ -2800,6 +2800,45 @@ class TestSnapRequestBuildsView(BaseTestSnapView):
> ),
> )
>
> + def test_request_builds_with_autobuild_archive(self):
> + # Ensure that auto_build_archive is used as default for builds
> + ppa = self.factory.makeArchive(
> + distribution=self.ubuntu, owner=self.person, name="snap-ppa"
> + )
> + login_person(self.person)
> + self.snap.auto_build_archive = ppa
> + browser = self.getViewBrowser(
> + self.snap, "+request-builds", user=self.person
> + )
> + browser.getControl("Request builds").click()
> +
> + login_person(self.person)
> + [request] = self.snap.pending_build_requests
> + self.assertThat(
> + request,
> + MatchesStructure(
> + archive=Equals(ppa),
> + ),
> + )
> +
> + def test_request_builds_with_autobuild_pocket(self):
> + # Ensure that auto_build_pocket is used as default for builds
> + login_person(self.person)
> + self.snap.auto_build_pocket = PackagePublishingPocket.SECURITY
> + browser = self.getViewBrowser(
> + self.snap, "+request-builds", user=self.person
> + )
> + browser.getControl("Request builds").click()
> +
> + login_person(self.person)
i don't know why, but i have to do a new (second) login, otherwise test case fails with:
Traceback (most recent call last):
File "/home/ubuntu/launchpad/launchpad/lib/lp/snappy/browser/tests/test_snap.py", line 2834, in test_request_builds_with_autobuild_pocket
[request] = self.snap.pending_build_requests
AttributeError: '_thread._local' object has no attribute 'interaction'
super weird.
> + [request] = self.snap.pending_build_requests
> + self.assertThat(
> + request,
> + MatchesStructure(
> + pocket=Equals(PackagePublishingPocket.SECURITY),
> + ),
> + )
> +
> def test_request_builds_no_architectures_action(self):
> # Requesting a build with no architectures selected creates a
> # pending build request.
--
https://code.launchpad.net/~xnox/launchpad/+git/launchpad/+merge/447665
Your team Launchpad code reviewers is requested to review the proposed merge of ~xnox/launchpad:snap-request-builds-mimick-auto into launchpad:master.
References