launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #03527
[Merge] lp:~mbp/launchpad/feature-install-cleanup into lp:launchpad
Martin Pool has proposed merging lp:~mbp/launchpad/feature-install-cleanup into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~mbp/launchpad/feature-install-cleanup/+merge/60280
test_distroseries seems to have its own implementation of one of the featureflag test fixtures; this makes it use the standard one.
tested with './bin/test -m test_distroseries'.
--
https://code.launchpad.net/~mbp/launchpad/feature-install-cleanup/+merge/60280
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~mbp/launchpad/feature-install-cleanup into lp:launchpad.
=== modified file 'lib/lp/registry/browser/tests/test_distroseries.py'
--- lib/lp/registry/browser/tests/test_distroseries.py 2011-05-05 20:51:47 +0000
+++ lib/lp/registry/browser/tests/test_distroseries.py 2011-05-07 15:22:28 +0000
@@ -52,12 +52,9 @@
from lp.services.features import (
get_relevant_feature_controller,
getFeatureFlag,
- install_feature_controller,
)
-from lp.services.features.flags import FeatureController
-from lp.services.features.model import (
- FeatureFlag,
- getFeatureStore,
+from lp.services.features.testing import (
+ FeatureFixture,
)
from lp.soyuz.enums import (
ArchivePermissionType,
@@ -86,18 +83,9 @@
def set_derived_series_ui_feature_flag(test_case):
- # Helper to set the feature flag enabling the derived series ui.
- getFeatureStore().add(FeatureFlag(
- scope=u'default', flag=u'soyuz.derived-series-ui.enabled',
- value=u'on', priority=1))
-
- # XXX Michael Nelson 2010-09-21 bug=631884
- # Currently LaunchpadTestRequest doesn't set per-thread
- # features.
- def in_scope(value):
- return True
- install_feature_controller(FeatureController(in_scope))
- test_case.addCleanup(install_feature_controller, None)
+ test_case.useFixture(FeatureFixture({
+ u'soyuz.derived-series-ui.enabled': 'on',
+ }))
class TestDistroSeriesView(TestCaseWithFactory):