Merge ~cjwatson/launchpad:fix-distribution-traversal into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 42edfb78b296f7808263baa10987035298bd9da5
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:fix-distribution-traversal
Merge into: launchpad:master
Diff against target: 45 lines (+8/-1)
2 files modified
lib/lp/registry/browser/tests/test_sourcepackage_views.py (+6/-1)
lib/lp/registry/stories/webservice/xx-distribution.txt (+2/-0)
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+394274@code.launchpad.net

Commit message

Fix test failures from distro traversal policies

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

Self-approving: this is a trivial test fix.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/registry/browser/tests/test_sourcepackage_views.py b/lib/lp/registry/browser/tests/test_sourcepackage_views.py
2index c3cac87..53403f5 100644
3--- a/lib/lp/registry/browser/tests/test_sourcepackage_views.py
4+++ b/lib/lp/registry/browser/tests/test_sourcepackage_views.py
5@@ -25,6 +25,7 @@ from lp.registry.browser.sourcepackage import (
6 PackageUpstreamTracking,
7 SourcePackageOverviewMenu,
8 )
9+from lp.registry.enums import DistributionDefaultTraversalPolicy
10 from lp.registry.interfaces.distribution import IDistribution
11 from lp.registry.interfaces.distroseries import (
12 IDistroSeries,
13@@ -142,7 +143,11 @@ class TestSourcePackageViewHelpers(TestCaseWithFactory):
14 sourcepackagename=Faker(name='foo'),
15 distroseries=FakeDistroSeries(
16 name='walrus',
17- distribution=FakeDistribution(name='zoobuntu')),
18+ distribution=FakeDistribution(
19+ name='zoobuntu',
20+ default_traversal_policy=(
21+ DistributionDefaultTraversalPolicy.SERIES),
22+ redirect_default_traversal=False)),
23 releases=[releases],
24 currentrelease=Faker(homepage=None),
25 )
26diff --git a/lib/lp/registry/stories/webservice/xx-distribution.txt b/lib/lp/registry/stories/webservice/xx-distribution.txt
27index a578671..f0748c2 100644
28--- a/lib/lp/registry/stories/webservice/xx-distribution.txt
29+++ b/lib/lp/registry/stories/webservice/xx-distribution.txt
30@@ -30,6 +30,7 @@ And for every distribution we publish most of its attributes.
31 cdimage_mirrors_collection_link: 'http://.../ubuntu/cdimage_mirrors'
32 current_series_link: 'http://.../ubuntu/hoary'
33 date_created: '2006-10-16T18:31:43.415195+00:00'
34+ default_traversal_policy: 'Series'
35 derivatives_collection_link: 'http://.../ubuntu/derivatives'
36 description: 'Ubuntu is a new approach...'
37 development_series_alias: None
38@@ -52,6 +53,7 @@ And for every distribution we publish most of its attributes.
39 official_codehosting: False
40 official_packages: True
41 owner_link: 'http://.../~ubuntu-team'
42+ redirect_default_traversal: False
43 redirect_release_uploads: False
44 registrant_link: 'http://.../~registry'
45 resource_type_link: 'http://.../#distribution'

Subscribers

People subscribed via source and target branches

to status/vote changes: