Merge lp://staging/~mbp/launchpad/featurefixture-from-request into lp://staging/launchpad

Proposed by Martin Pool
Status: Merged
Approved by: Martin Pool
Approved revision: no longer in the source branch.
Merged at revision: 14470
Proposed branch: lp://staging/~mbp/launchpad/featurefixture-from-request
Merge into: lp://staging/launchpad
Diff against target: 120 lines (+30/-8)
2 files modified
lib/canonical/launchpad/webapp/tests/test_publisher.py (+10/-5)
lib/lp/services/features/testing.py (+20/-3)
To merge this branch: bzr merge lp://staging/~mbp/launchpad/featurefixture-from-request
Reviewer Review Type Date Requested Status
j.c.sackett (community) Approve
Review via email: mp+84887@code.staging.launchpad.net

Commit message

[r=jcsackett][no-qa] by default, FeatureFixture resolves scopes using the request

Description of the change

At the moment the test FeatureFixture assumes all scopes are active, which is probably not what you want, and at least not what I would have expected.

This makes it look at the current request instead, but leaves an option to get back the old behaviour, which seems not trivial to remove from the beta ribbon tests.

To post a comment you must log in.
Revision history for this message
j.c.sackett (jcsackett) wrote :

Is this actually necessary?

It looks like in all instances where this fixture is used you're now passing in the lambda to create an always true override *anyway*. Is there work in progress that requires this change?

review: Needs Information
Revision history for this message
Martin Pool (mbp) wrote :

Yes: there are other tests, untouched by this patch, that are happy having
the scopes from the request used, which is more realistic. Also the user
slice scope branch, which depends on this, wants to test the scope is
hooked up properly during a request.
On Dec 9, 2011 2:15 AM, "j.c.sackett" <email address hidden> wrote:

> Review: Needs Information
>
> Is this actually necessary?
>
> It looks like in all instances where this fixture is used you're now
> passing in the lambda to create an always true override *anyway*. Is there
> work in progress that requires this change?
> --
>
> https://code.launchpad.net/~mbp/launchpad/featurefixture-from-request/+merge/84887
> You are the owner of lp:~mbp/launchpad/featurefixture-from-request.
>
>

Revision history for this message
j.c.sackett (jcsackett) wrote :

Okay, thanks. This looks fine, then.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.