Merge ~twom/launchpad:fix-oops-on-oci-recipe-edit into launchpad:master

Proposed by Tom Wardill
Status: Merged
Approved by: Tom Wardill
Approved revision: 6b63d24b286274c16a3262c70d5be78e772624fd
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~twom/launchpad:fix-oops-on-oci-recipe-edit
Merge into: launchpad:master
Diff against target: 49 lines (+3/-3)
2 files modified
lib/lp/oci/browser/ocirecipe.py (+0/-2)
lib/lp/oci/browser/tests/test_ocirecipe.py (+3/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+388728@code.launchpad.net

Commit message

Remove push_rules from edit schema and field_names

Description of the change

Modify test to include an OCIPushRule, then remove the push_rule from field names and schema for editing.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/lp/oci/browser/ocirecipe.py b/lib/lp/oci/browser/ocirecipe.py
index e18d990..7c463d5 100644
--- a/lib/lp/oci/browser/ocirecipe.py
+++ b/lib/lp/oci/browser/ocirecipe.py
@@ -500,7 +500,6 @@ class IOCIRecipeEditSchema(Interface):
500 "build_daily",500 "build_daily",
501 "require_virtualized",501 "require_virtualized",
502 "allow_internet",502 "allow_internet",
503 "push_rules",
504 ])503 ])
505504
506505
@@ -632,7 +631,6 @@ class OCIRecipeEditView(BaseOCIRecipeEditView, EnableProcessorsMixin):
632 "git_ref",631 "git_ref",
633 "build_file",632 "build_file",
634 "build_daily",633 "build_daily",
635 "push_rules",
636 )634 )
637 custom_widget_git_ref = GitRefWidget635 custom_widget_git_ref = GitRefWidget
638636
diff --git a/lib/lp/oci/browser/tests/test_ocirecipe.py b/lib/lp/oci/browser/tests/test_ocirecipe.py
index f85df0f..648096d 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipe.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipe.py
@@ -324,7 +324,7 @@ class TestOCIRecipeAdminView(BaseTestOCIRecipeView):
324 recipe, "date_last_modified", UTC_NOW)324 recipe, "date_last_modified", UTC_NOW)
325325
326326
327class TestOCIRecipeEditView(BaseTestOCIRecipeView):327class TestOCIRecipeEditView(OCIConfigHelperMixin, BaseTestOCIRecipeView):
328328
329 def setUp(self):329 def setUp(self):
330 super(TestOCIRecipeEditView, self).setUp()330 super(TestOCIRecipeEditView, self).setUp()
@@ -335,6 +335,7 @@ class TestOCIRecipeEditView(BaseTestOCIRecipeView):
335 "oci.build_series.%s" % self.distribution.name:335 "oci.build_series.%s" % self.distribution.name:
336 self.distroseries.name,336 self.distroseries.name,
337 }))337 }))
338 self.setConfig()
338339
339 def setUpDistroSeries(self):340 def setUpDistroSeries(self):
340 """Set up self.distroseries with some available processors."""341 """Set up self.distroseries with some available processors."""
@@ -368,6 +369,7 @@ class TestOCIRecipeEditView(BaseTestOCIRecipeView):
368 self.factory.makeTeam(369 self.factory.makeTeam(
369 name="new-team", displayname="New Team", members=[self.person])370 name="new-team", displayname="New Team", members=[self.person])
370 [new_git_ref] = self.factory.makeGitRefs()371 [new_git_ref] = self.factory.makeGitRefs()
372 self.factory.makeOCIPushRule(recipe=recipe)
371373
372 browser = self.getViewBrowser(recipe, user=self.person)374 browser = self.getViewBrowser(recipe, user=self.person)
373 browser.getLink("Edit OCI recipe").click()375 browser.getLink("Edit OCI recipe").click()

Subscribers

People subscribed via source and target branches

to status/vote changes: