~replaceafill/ubuntu/trusty/schooltool/2.8_custom-css

« back to all changes in this revision

Viewing changes to src/schooltool/generations/tests/test_evolve35.py

  • Committer: Douglas Cerna
  • Date: 2014-10-14 16:05:11 UTC
  • mfrom: (1.1.36)
  • Revision ID: douglascerna@yahoo.com-20141014160511-v2zzlmyuwjsfizai
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
from schooltool.app.interfaces import ISchoolToolApplication
37
37
from schooltool.generations.tests import ContextStub
 
38
from schooltool.generations.tests import setUp
 
39
from schooltool.generations.tests import tearDown
38
40
from schooltool.generations.evolve35 import CATALOG_KEYS
39
41
 
40
42
 
54
56
        return '<%s (%s)>' % (self.__class__.__name__, self.name)
55
57
 
56
58
 
57
 
class AppStub(Folder):
58
 
    implements(ISchoolToolApplication)
59
 
 
60
 
 
61
59
def doctest_evolve35():
62
60
    """Test evolution to generation 35.
63
61
 
64
 
    We'll need int ids.
65
 
 
66
 
        >>> provideUtility(IntIds(), IIntIds)
67
 
 
68
62
    First, let's build ST app with local catalog utilities.
69
63
 
70
 
        >>> context = ContextStub()
71
 
        >>> context.root_folder['app'] = app = AppStub()
72
 
        >>> app.setSiteManager(LocalSiteManager(app))
 
64
        >>> context = ContextStub(app)
73
65
 
74
66
        >>> for name in CATALOG_KEYS:
75
67
        ...     registerLocalUtility(app, UtilityStub(name), name)
107
99
    """
108
100
 
109
101
 
110
 
def setUp(test):
111
 
    setup.placefulSetUp()
112
 
    setup.setUpTraversal()
113
 
 
114
 
 
115
 
def tearDown(test):
116
 
    setup.placefulTearDown()
117
 
 
118
 
 
119
102
def test_suite():
120
103
    optionflags = (doctest.ELLIPSIS |
121
104
                   doctest.NORMALIZE_WHITESPACE |