~ubuntuone-pqm-team/canonical-identity-provider/trunk

« back to all changes in this revision

Viewing changes to doctests/stories/openid/_read-only-mode.txt

  • Committer: Danny Tamez
  • Date: 2010-04-21 15:29:24 UTC
  • Revision ID: danny.tamez@canonical.com-20100421152924-lq1m92tstk2iz75a
Canonical SSO Provider (Open Source) - Initial Commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Copyright 2010 Canonical Ltd.  This software is licensed under the
 
2
GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
= Read-Only Mode and the SSO =
 
5
 
 
6
There is no warning on the SSO server about the Launchpad read-only mode, 
 
7
as it is not affected by this mode.
 
8
 
 
9
    >>> from canonical.config import config
 
10
    >>> def push_read_only_mode(flag):
 
11
    ...     config.push('read only mode', """
 
12
    ...         [launchpad]
 
13
    ...         read_only: %s""" % str(flag))
 
14
    >>> def pop_read_only_mode():
 
15
    ...     config.pop('read only mode')
 
16
    >>> push_read_only_mode(True)
 
17
 
 
18
    >>> user_browser.open('http://openid.launchpad.dev')
 
19
    >>> print first_tag_by_class(
 
20
    ...     user_browser.contents, 'warning message')
 
21
    None
 
22
 
 
23
    >>> pop_read_only_mode()
 
24