def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='Term')
     factory = fti.factory
     new_object = createObject(factory)
     self.assertTrue(ITerm.providedBy(new_object))
示例#2
0
    def is_glossary_object(self):
        """Check if we are in the context of a Glossary or a Term."""

        context = self.context
        return IGlossary.providedBy(context) or ITerm.providedBy(context)
 def test_adding(self):
     self.assertTrue(ITerm.providedBy(self.t1))