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
1diff --git a/lib/lp/oci/browser/ocirecipe.py b/lib/lp/oci/browser/ocirecipe.py
2index e18d990..7c463d5 100644
3--- a/lib/lp/oci/browser/ocirecipe.py
4+++ b/lib/lp/oci/browser/ocirecipe.py
5@@ -500,7 +500,6 @@ class IOCIRecipeEditSchema(Interface):
6 "build_daily",
7 "require_virtualized",
8 "allow_internet",
9- "push_rules",
10 ])
11
12
13@@ -632,7 +631,6 @@ class OCIRecipeEditView(BaseOCIRecipeEditView, EnableProcessorsMixin):
14 "git_ref",
15 "build_file",
16 "build_daily",
17- "push_rules",
18 )
19 custom_widget_git_ref = GitRefWidget
20
21diff --git a/lib/lp/oci/browser/tests/test_ocirecipe.py b/lib/lp/oci/browser/tests/test_ocirecipe.py
22index f85df0f..648096d 100644
23--- a/lib/lp/oci/browser/tests/test_ocirecipe.py
24+++ b/lib/lp/oci/browser/tests/test_ocirecipe.py
25@@ -324,7 +324,7 @@ class TestOCIRecipeAdminView(BaseTestOCIRecipeView):
26 recipe, "date_last_modified", UTC_NOW)
27
28
29-class TestOCIRecipeEditView(BaseTestOCIRecipeView):
30+class TestOCIRecipeEditView(OCIConfigHelperMixin, BaseTestOCIRecipeView):
31
32 def setUp(self):
33 super(TestOCIRecipeEditView, self).setUp()
34@@ -335,6 +335,7 @@ class TestOCIRecipeEditView(BaseTestOCIRecipeView):
35 "oci.build_series.%s" % self.distribution.name:
36 self.distroseries.name,
37 }))
38+ self.setConfig()
39
40 def setUpDistroSeries(self):
41 """Set up self.distroseries with some available processors."""
42@@ -368,6 +369,7 @@ class TestOCIRecipeEditView(BaseTestOCIRecipeView):
43 self.factory.makeTeam(
44 name="new-team", displayname="New Team", members=[self.person])
45 [new_git_ref] = self.factory.makeGitRefs()
46+ self.factory.makeOCIPushRule(recipe=recipe)
47
48 browser = self.getViewBrowser(recipe, user=self.person)
49 browser.getLink("Edit OCI recipe").click()

Subscribers

People subscribed via source and target branches

to status/vote changes: