need feature flag test fixture

Bug #645768 reported by Martin Pool
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Māris Fogels

Bug Description

I'd like to be able to write tests which say

  with FeatureFixture({'services.memcache.tal.enabled': 'True'}):
     ... test what happens

at the moment it requires manually creating rules which is a bit gross.

Related branches

Revision history for this message
Martin Pool (mbp) wrote :
Martin Pool (mbp)
Changed in launchpad-foundations:
status: Confirmed → In Progress
Revision history for this message
Martin Pool (mbp) wrote :

Maris, it looks really good. When you propose this, can you please

- mention it in the services.features top-level docstring
- advertise it on the list
- cc me on the review

Thanks!

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Looks great Maris!

Just a thought - I'm wondering if it should be more general, enabling multiple flags... perhaps that's why you've used a dict, but just a thought, would the following read more easily?

with features_flags({'services.memcache.tal.enabled': 'True', ...}):
    ....

Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit

Fixed in stable r11853 (http://bazaar.launchpad.net/~launchpad-pqm/launchpad/stable/revision/11853) by a commit, but not testable.

Changed in launchpad-foundations:
milestone: none → 10.11
tags: added: qa-untestable
Changed in launchpad-foundations:
status: In Progress → Fix Committed
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.