Exemplo n.º 1
0
    def setUp(self):
        placefulSetUp()
        provideAdapter(getTermContainer, [Interface], ITermContainer)
        provideAdapter(getSchoolYearContainer)
        app = setup.setUpSchoolToolSite()

        schoolyear = SchoolYear("Sample", date(2004, 9, 1), date(2005, 12, 20))
        ISchoolYearContainer(app)['2004-2005'] = schoolyear

        self.term1 = term.Term('Sample', date(2004, 9, 1), date(2004, 12, 20))
        self.term2 = term.Term('Sample', date(2005, 1, 1), date(2005, 6, 1))
        terms = ITermContainer(app)
        terms['2004-fall'] = self.term1
        terms['2005-spring'] = self.term2
        self.app = app
Exemplo n.º 2
0
    def setUp(self):
        placefulSetUp()
        provideAdapter(getTermContainer, [Interface], ITermContainer)
        provideAdapter(getSchoolYearContainer)
        app = setup.setUpSchoolToolSite()

        schoolyear = SchoolYear("Sample", date(2004, 9, 1), date(2005, 12, 20))
        ISchoolYearContainer(app)['2004-2005'] = schoolyear

        self.term1 = term.Term('Sample', date(2004, 9, 1), date(2004, 12, 20))
        self.term2 = term.Term('Sample', date(2005, 1, 1), date(2005, 6, 1))
        terms = ITermContainer(app)
        terms['2004-fall'] = self.term1
        terms['2005-spring'] = self.term2
        self.app = app
Exemplo n.º 3
0
def docSetUp(test=None):
    zope_setup.placefulSetUp()
    zope_setup.setUpAnnotations()
    zope_setup.setUpTraversal()
    test.globs['app'] = setUpSchoolToolSite()
    setUpRelationships()

    provideAdapter(getSchoolYearContainer)
    provideAdapter(getTermContainer, (Interface,))
    provideAdapter(getSchoolYearForTerm)
    provideAdapter(getCourseContainer)
    provideAdapter(getCourseContainerForApp)
    provideAdapter(getSectionContainer)
    provideAdapter(getTermForSection)
    provideAdapter(getTermForSectionContainer)
    provideAdapter(getTimetableContainer)
    provideAdapter(getScheduleContainer)
    setUpIntIds()

    provideAdapter(SectionNameChooser, (ISectionContainer,))

    transaction.begin()
def docSetUp(test=None):
    zope_setup.placefulSetUp()
    zope_setup.setUpAnnotations()
    zope_setup.setUpTraversal()
    test.globs['app'] = setUpSchoolToolSite()
    setUpRelationships()

    provideAdapter(getSchoolYearContainer)
    provideAdapter(getTermContainer, (Interface, ))
    provideAdapter(getSchoolYearForTerm)
    provideAdapter(getCourseContainer)
    provideAdapter(getCourseContainerForApp)
    provideAdapter(getSectionContainer)
    provideAdapter(getTermForSection)
    provideAdapter(getTermForSectionContainer)
    provideAdapter(getTimetableContainer)
    provideAdapter(getScheduleContainer)
    setUpIntIds()

    provideAdapter(SectionNameChooser, (ISectionContainer, ))

    transaction.begin()