Merge lp:~abentley/launchpad/test-feature-flags into lp:launchpad/db-devel
Status: | Merged |
---|---|
Approved by: | Paul Hummer |
Approved revision: | no longer in the source branch. |
Merged at revision: | 9850 |
Proposed branch: | lp:~abentley/launchpad/test-feature-flags |
Merge into: | lp:launchpad/db-devel |
Diff against target: |
130 lines (+83/-4) 2 files modified
lib/lp/testing/__init__.py (+40/-4) lib/lp/testing/tests/test_testing.py (+43/-0) |
To merge this branch: | bzr merge lp:~abentley/launchpad/test-feature-flags |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | Approve | ||
Review via email: mp+37061@code.launchpad.net |
Commit message
Provide test helpers for feature flags.
Description of the change
= Summary =
Provide test helpers for feature flags.
== Proposed fix ==
Provide a feature_flags context manager that allows feature flags to work
Provide a set_feature_flag function that allows a feature flag to be set.
== Pre-implementation notes ==
None, but these are based on the memcache tests that Robert gave as an example
of good feature flags tests.
== Implementation details ==
None
== Tests ==
bin/test -vvt TestFeatureFlags testing
== Demo and Q/A ==
None
= Launchpad lint =
The import issues are because testing imports from other modules to provide a
central location to import from. The rest are bogus.
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
./lib/lp/
132: 'anonymous_
132: 'with_anonymous
132: 'is_logged_in' imported but unused
151: 'launchpadlib_for' imported but unused
151: 'launchpadlib_
132: 'person_logged_in' imported but unused
151: 'oauth_
132: 'login_celebrity' imported but unused
132: 'with_celebrity
150: 'test_tales' imported but unused
132: 'celebrity_
132: 'run_with_login' imported but unused
132: 'with_person_
132: 'login_team' imported but unused
132: 'login_person' imported but unused
132: 'login_as' imported but unused
692: E301 expected 1 blank line, found 0
875: E301 expected 1 blank line, found 0
901: E302 expected 2 blank lines, found 1
977: E302 expected 2 blank lines, found 1