~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/features/tests/test_scopes.py

  • Committer: Michael-Doyle Hudson
  • Date: 2011-09-21 21:12:02 UTC
  • mto: This revision was merged to the branch mainline in revision 14068.
  • Revision ID: michael.hudson@linaro.org-20110921211202-xk3mjmjqrufx10f5
revert the reversion of the xmlrpc feature flag endpoint

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
from lp.testing import TestCaseWithFactory
10
10
from lp.services.features.scopes import (
11
11
    BaseScope,
12
 
    BaseWebRequestScope,
13
12
    MultiScopeHandler,
14
13
    ScopesForScript,
15
14
    ScriptScope,
16
15
    )
17
16
 
18
17
 
19
 
class FakeScope(BaseWebRequestScope):
 
18
class FakeScope(BaseScope):
20
19
    pattern = r'fake:'
21
20
 
 
21
    def __init__(self, name):
 
22
        self.name = name
 
23
 
22
24
    def lookup(self, scope_name):
23
 
        return scope_name == (self.pattern + self.request)
 
25
        return scope_name == (self.pattern + self.name)
24
26
 
25
27
 
26
28
class TestScopes(TestCaseWithFactory):