def setUp(self): classImplements(TranslationDomain, IAttributeAnnotatable) self.sm = PlacefulSetup.setUp(self, site=True) TestITranslationDomain.setUp(self) setup.addUtility(self.sm, "default", ITranslationDomain, self._domain) ztapi.provideUtility(IFactory, Factory(MessageCatalog), "zope.app.MessageCatalog")
def setUp(self): TestITranslationDomain.setUp(self) # placefulSetup setup.setUpTraversal() setup.setUpSiteManagerLookup() self.rootFolder = setup.buildSampleFolderTree() self.sm = setup.createSiteManager(self.rootFolder, setsite=True) setup.addUtility(self.sm, 'default', ITranslationDomain, self._domain) provideUtility(Factory(MessageCatalog), IFactory, 'zope.app.MessageCatalog')
def testNoTargetLanguage(self): # Having a fallback would interfere with this test self._domain.setLanguageFallbacks([]) TestITranslationDomain.testNoTargetLanguage(self)
def tearDown(self): TestITranslationDomain.tearDown(self)
def setUp(self): TestITranslationDomain.setUp(self)