← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:fix-remove-snap-webhooks-enabled-rule into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:fix-remove-snap-webhooks-enabled-rule into launchpad:master.

Commit message:
Fix test_translatePath_private_snap_build

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/433731

Removing the `snap.webhooks.enabled` feature rule caused the `updateStatus` call here to do a bit more work than before.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:fix-remove-snap-webhooks-enabled-rule into launchpad:master.
diff --git a/lib/lp/code/xmlrpc/tests/test_git.py b/lib/lp/code/xmlrpc/tests/test_git.py
index 05ccc58..d4aa3ff 100644
--- a/lib/lp/code/xmlrpc/tests/test_git.py
+++ b/lib/lp/code/xmlrpc/tests/test_git.py
@@ -2311,7 +2311,8 @@ class TestGitAPI(TestGitAPIMixin, TestCaseWithFactory):
         self.pushConfig(
             "launchpad", internal_macaroon_secret_key="some-secret"
         )
-        with person_logged_in(self.factory.makePerson()) as owner:
+        owner = self.factory.makePerson()
+        with person_logged_in(owner):
             refs = [
                 self.factory.makeGitRefs(
                     owner=owner, information_type=InformationType.USERDATA
@@ -2338,7 +2339,8 @@ class TestGitAPI(TestGitAPIMixin, TestCaseWithFactory):
             permission="write",
             macaroon_raw=macaroons[0].serialize(),
         )
-        removeSecurityProxy(builds[0]).updateStatus(BuildStatus.BUILDING)
+        with person_logged_in(owner):
+            builds[0].updateStatus(BuildStatus.BUILDING)
         self.assertTranslates(
             LAUNCHPAD_SERVICES,
             path,