Ignore:
Timestamp:
Mar 6, 2012 3:21:28 PM (12 years ago)
Author:
kroman0
Message:

Fixed tests for plone 4.1+

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.analytics/trunk/quintagroup/analytics/tests.py

    r3375 r3376  
    321321                                 name="type_by_state") 
    322322        self.pc = self.portal.portal_catalog 
     323        portal_migration = self.portal.portal_migration 
     324        self.plone_version = portal_migration.getInstanceVersion() 
    323325 
    324326    def test_getTypes(self): 
     
    382384            '3.0|0.0,0.0,0.0,0.0&chxr=0,0,159&chco=669933,'\ 
    383385            'cc9966,993300,ff6633,e8e4e3,a9a486,dcb57e,ffcc99,996633,'\ 
    384             '333300,00ff00&chl=Folder|Document|Event|Topic&'\ 
     386            '333300,00ff00&chl=folder|document|event|topic&'\ 
    385387            'chbh=a,10,0&chs=800x375&cht=bvs&'\ 
    386             'chtt=Content+type+by+state&chdl=private|published|'\ 
    387             'No+workflow&chdlp=b"/>' 
    388  
    389         chart_tag = plone4chart_tag 
    390         if not PLONE40: 
     388            'chtt=content+type+by+state&chdl=private|published|'\ 
     389            'no+workflow&chdlp=b"/>' 
     390        plone41chart_tag = \ 
     391            '<imgsrc="http://chart.apis.google.com/chart?chxt=y&amp;'\ 
     392            'chds=0,159&amp;chd=t:156.0,145.0,145.0,0.0|3.0,1.0,0.0,'\ 
     393            '3.0|0.0,0.0,0.0,0.0&amp;chxr=0,0,159&amp;chco=669933,'\ 
     394            'cc9966,993300,ff6633,e8e4e3,a9a486,dcb57e,ffcc99,996633,'\ 
     395            '333300,00ff00&amp;chl=folder|document|event|topic&amp;'\ 
     396            'chbh=a,10,0&amp;chs=800x375&amp;cht=bvs&amp;'\ 
     397            'chtt=content+type+by+state&amp;chdl=private|published|'\ 
     398            'no+workflow&amp;chdlp=b"/>' 
     399 
     400        if self.plone_version < "4.0": 
    391401            chart_tag = plone33chart_tag 
     402        elif self.plone_version > "4.1": 
     403            chart_tag = plone41chart_tag 
     404        else: 
     405            chart_tag = plone4chart_tag 
    392406 
    393407        self.loginAsPortalOwner() 
Note: See TracChangeset for help on using the changeset viewer.