예제 #1
0
 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)
예제 #3
0
 def test_adding(self):
     self.assertTrue(ITerm.providedBy(self.t1))