[Zope-CMF] Setting up a dummy vocabulary for a doctest

Charlie Clark charlie.clark at clark-consulting.eu
Sat Sep 25 16:48:28 EDT 2010


Am 18.09.2010, 19:23 Uhr, schrieb Charlie Clark  
<charlie.clark at clark-consulting.eu>:

> Error Value:\n unknown vocabulary: u\'cmf.portal_skins\'
> Any ideas?

Okay, figured this out because I've had it before! Relevant vocabularies  
can be registered when setting up the doctest:


 from Products.CMFDefault.browser.content.tests.utils import clearVocabulary
 from Products.CMFDefault.browser.content.tests.utils import setupVocabulary

ftest_suite = ZopeTestCase.FunctionalDocFileSuite('preferences.txt',
                 setUp=setupVocabulary,
                 tearDown=clearVocabulary,
                             )

Now, let's see how long I actually remember how to do this!

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226


More information about the Zope-CMF mailing list