예제 #1
0
import os, sys
if __name__ == '__main__':
    execfile(os.path.join(sys.path[0], 'framework.py'))

package = 'Products.Relations.doc'

from Products.CMFTestCase import CMFTestCase

import common
common.installProducts()
CMFTestCase.setupCMFSite()

from Products.Relations.config import *

class TestOverviewTxt(CMFTestCase.CMFTestCase):

    def afterSetUp(self):
        common.installWithinPortal(self, self.portal)
        self.folder.invokeFactory('SimpleType', 'alfred')
        self.folder.invokeFactory('ComplexType', 'manfred')
        self.ruleset = common.createRuleset(self, 'IsParentOf')
        

def test_suite():
    from unittest import TestSuite
    from Testing.ZopeTestCase.zopedoctest import ZopeDocFileSuite

    return TestSuite((
        ZopeDocFileSuite('Overview.txt',
                         package='Products.Relations.doc',
                         test_class=TestOverviewTxt),
#

import os, sys
if __name__ == '__main__':
    execfile(os.path.join(sys.path[0], 'framework.py'))

from Testing import ZopeTestCase
from Products.PloneTestCase import PloneTestCase

from Products.ATVocabularyManager.config import *

from Products.CMFCore.utils import getToolByName


import common
common.installProducts()


class TestATVocabularyManager(PloneTestCase.PloneTestCase):

    def afterSetUp(self):
        self.qi = getToolByName(self.portal, 'portal_quickinstaller')        




    def test_install(self):       
        # atvm is not installed
        self.failIf(self.qi.isProductInstalled(PROJECTNAME))
        
        # installing atvm