;ò lh†>c@sêdZddd!Zddd!Zddd!ZdkZdkZedjo$eeii eid d ƒƒnd k l Z e i d ƒd k lZde i fd„ƒYZedjoeddddƒndkZd„ZdS(sœ $RCSfile: TestXSLTProcessor.py,v $ Unit tests for ZopeXMLMethods product Author: Craeg Strong Release: 1.0 s $Name: $iiþÿÿÿs$Date: 2003/03/30 03:45:47 $s$Revision: 1.22 $i Ns__main__is framework.py(s ZopeTestCasesZopeXMLMethods(sProcessorChoosersXSLTProcessorTestCasecBsDtZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s­ XSLT Processor tests. This is particularly useful if switching from one library to another, for example upgrading 4Suite or switching to Pyana or Saxon. cCsX|iid}tƒ|_|iiƒ|_t|iƒdjot dƒ‚ndS(sAdd object to default fixturesZopeXMLMethodsis)Error: no supported XSLT Processors foundN( sselfsfoldersmanage_addProductsprodsProcessorChooserschoosers processorss processorListslens Exception(sselfsprod((sU/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/tests/TestXSLTProcessor.pys afterSetUp&s  cCs$y |`Wntj onXdS(sClean up after myselfN(sselfsprodsAttributeError(sself((sU/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/tests/TestXSLTProcessor.pys afterClear4s  c CsŸtddƒ}|iƒ}tddƒ}|iƒ}Hxa|iD]V}dG|G|i i |ƒ}|i |d|dt t t ƒ}|i|dƒdGHqAWdS( sBasic processor testsstestfiles/simple.xmlsrbstestfiles/simple.xslsTesting processorss Hello, worlds...okN(sopensxmlFilesreads xmlContentssxsltFiles xsltContentssselfs processorListsnameschoosersprocessorObjects processors transformGutssNonesresults assertEquals(sselfs xsltContentssxmlFilesnames xmlContentssxsltFilesresults processor((sU/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/tests/TestXSLTProcessor.pystest_01=s   c Cs–tddƒ}|iƒ}tddƒ}|iƒ}HxX|iD]M}dG|G|i i |ƒ}|i t |i|d|dtttƒ dGHqAWdS(sTest for Invalid XMLstestfiles/invalid.xmlsrbstestfiles/simple.xslsTesting processorss...okN(sopensxmlFilesreads xmlContentssxsltFiles xsltContentssselfs processorListsnameschoosersprocessorObjects processors assertRaisess Exceptions transformGutssNone(sselfs xsltContentssxmlFilesnames xmlContentssxsltFiles processor((sU/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/tests/TestXSLTProcessor.pystest_02Ns    c Cs–tddƒ}|iƒ}tddƒ}|iƒ}HxX|iD]M}dG|G|i i |ƒ}|i t |i|d|dtttƒ dGHqAWdS(s#Test for non valid xslt transformerstestfiles/simple.xmlsrbstestfiles/invalid.xslsTesting processorss...okN(sopensxmlFilesreads xmlContentssxsltFiles xsltContentssselfs processorListsnameschoosersprocessorObjects processors assertRaisess Exceptions transformGutssNone(sselfs xsltContentssxmlFilesnames xmlContentssxsltFiles processor((sU/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/tests/TestXSLTProcessor.pystest_03_s    c CsËtddƒ}|iƒ}tddƒ}|iƒ}Hx|iD]‚}dG|G|i i |ƒ}h}|i |ddƒ|i |ddƒ|i|d |d t|tƒ}|i|d ƒd GHqAWd S( s4Test that the processor handles parameters correctlystestfiles/param.xmlsrbstestfiles/param.xslsTesting processorswhosworldsmessagesgoodbyessHello, world and goodbyes...okN(sopensxmlFilesreads xmlContentssxsltFiles xsltContentssselfs processorListsnameschoosersprocessorObjects processorsparamssaddParams transformGutssNonesresults assertEquals( sselfs xsltContentssxmlFilesnames xmlContentssxsltFilesparamssresults processor((sU/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/tests/TestXSLTProcessor.pystest_04ps"   ( s__name__s __module__s__doc__s afterSetUps afterClearstest_01stest_02stest_03stest_04(((sU/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/tests/TestXSLTProcessor.pysXSLTProcessorTestCases     s descriptionsis verbosityicCs*tiƒ}|ititƒƒ|SdS(N(sunittests TestSuitessuitesaddTests makeSuitesXSLTProcessorTestCase(ssuite((sU/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/tests/TestXSLTProcessor.pys test_suites (s__doc__s __cvstag__s__date__s __version__sosssyss__name__sexecfilespathsjoinsTestings ZopeTestCasesinstallProducts(Products.ZopeXMLMethods.ProcessorChoosersProcessorChoosersXSLTProcessorTestCases frameworksunittests test_suite( s__date__sXSLTProcessorTestCases ZopeTestCasesunittestsProcessorChoosers __cvstag__s test_suitessyss __version__sos((sU/mnt/gmirror/ports/www/zope-xmlmethods/work/ZopeXMLMethods/tests/TestXSLTProcessor.pys?s    $   q