~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/lp/ftests/test_zopeless.py

  • Committer: Jelmer Vernooij
  • Date: 2011-09-21 14:28:02 UTC
  • mfrom: (14006 devel)
  • mto: This revision was merged to the branch mainline in revision 14010.
  • Revision ID: jelmer@canonical.com-20110921142802-7ggkc204igsy532w
MergeĀ lp:launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
2
 
# GNU Affero General Public License version 3 (see the file LICENSE).
3
 
 
4
 
"""
5
 
Tests to make sure that initZopeless works as expected.
6
 
"""
7
 
 
8
 
from doctest import DocTestSuite
9
 
from canonical.lp import initZopeless
10
 
from canonical.testing.layers import ZopelessDatabaseLayer
11
 
 
12
 
 
13
 
def test_isZopeless():
14
 
    """
15
 
    >>> from canonical.lp import isZopeless
16
 
 
17
 
    >>> isZopeless()
18
 
    False
19
 
 
20
 
    >>> tm = initZopeless(dbuser='launchpad')
21
 
    >>> isZopeless()
22
 
    True
23
 
 
24
 
    >>> tm.uninstall()
25
 
    >>> isZopeless()
26
 
    False
27
 
 
28
 
    """
29
 
 
30
 
 
31
 
def test_suite():
32
 
    doctests = DocTestSuite()
33
 
    doctests.layer = ZopelessDatabaseLayer
34
 
    return doctests