Changeset 2960 in products for quintagroup.seoptimizer/branches/plone4


Ignore:
Timestamp:
Nov 2, 2010 11:31:57 AM (14 years ago)
Author:
mylan
Message:

#233: Removed debugging coded from testBugs module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.seoptimizer/branches/plone4/quintagroup/seoptimizer/tests/testBugs.py

    r2958 r2960  
    137137        self.member_auth = '%s:%s'%(member_id, test_pswd) 
    138138        self.editor_auth = '%s:%s'%(editor_id, test_pswd) 
    139  
    140139        self.portal_url = '/'.join(self.portal.getPhysicalPath()) 
    141         #alsoProvides(self.app.REQUEST, IPloneSEOLayer) 
    142         # add IPloneSEOLayer 
    143         directlyProvides(self.portal.REQUEST, IPloneSEOLayer) 
    144  
    145  
    146140 
    147141    def test_not_break(self): 
     
    149143        # Anonymous 
    150144        resp = self.publish(path=self.portal_url) 
    151         file("/tmp/b24.0.1.html","wb").write(resp.getBody()) 
    152         #self.assertEqual(resp.getStatus(), 200) 
     145        self.assertEqual(resp.getStatus(), 200) 
    153146        # Member 
    154147        resp = self.publish(path=self.portal_url, basic=self.member_auth) 
    155         file("/tmp/b24.0.2.html","wb").write(resp.getBody()) 
    156         #self.assertEqual(resp.getStatus(), 200) 
     148        self.assertEqual(resp.getStatus(), 200) 
    157149        # Editor: this fails, althought must pass 
    158150        resp = self.publish(path=self.portal_url, basic=self.editor_auth) 
    159         file("/tmp/b24.0.3.html","wb").write(resp.getBody()) 
    160  
    161151        self.assertEqual(resp.getStatus(), 200) 
    162152 
     
    168158        # Anonymous: NO SEO Properties link 
    169159        res = self.publish(path=self.portal_url).getBody() 
    170         file("/tmp/b24.1.1.html","wb").write(res) 
    171  
    172         # self.assertEqual(rexp.search(res), None) 
     160        self.assertEqual(rexp.search(res), None) 
    173161        # Member: NO 'SEO Properties' link 
    174162        res = self.publish(path=self.portal_url, basic=self.member_auth).getBody() 
    175         file("/tmp/b24.1.2.html","wb").write(res) 
    176         # self.assertEqual(rexp.search(res), None) 
     163        self.assertEqual(rexp.search(res), None) 
    177164        # Editor: PRESENT 'SEO Properties' link 
    178165        res = self.publish(path=self.portal_url, basic=self.editor_auth).getBody() 
    179         file("/tmp/b24.1.3.html","wb").write(res) 
    180         # self.assertNotEqual(rexp.search(res), None) 
     166        self.assertNotEqual(rexp.search(res), None) 
    181167 
    182168    def test_tab_access(self): 
     
    185171        # Anonymous: can NOT ACCESS 
    186172        headers = self.publish(path=test_url).headers 
    187         # self.assertEqual( headers.get('bobo-exception-type',""), 'Unauthorized', 
    188         #    "No 'Unauthorized' exception rised for Anonymous on '@@seo-context-properties' view") 
     173        self.assertEqual( headers.get('bobo-exception-type',""), 'Unauthorized', 
     174            "No 'Unauthorized' exception rised for Anonymous on '@@seo-context-properties' view") 
    189175        # Member: can NOT ACCESS 
    190176        status = self.publish(path=test_url, basic=self.member_auth).headers 
    191         # self.assertEqual( headers.get('bobo-exception-type',""), 'Unauthorized', 
    192         #    "No 'Unauthorized' exception rised for Member on '@@seo-context-properties' view") 
     177        self.assertEqual( headers.get('bobo-exception-type',""), 'Unauthorized', 
     178            "No 'Unauthorized' exception rised for Member on '@@seo-context-properties' view") 
    193179        # Editor: CAN Access 
    194180        res = self.publish(path=test_url, basic=self.editor_auth) 
    195         file("/tmp/b24.2.1.html","wb").write(res.getBody()) 
    196  
    197         # self.assertEqual(res.status, 200) 
     181        self.assertEqual(res.status, 200) 
    198182 
    199183 
     
    206190        res = self.publish(path=test_url, basic=self.editor_auth, 
    207191                  request_method='POST', stdin=StringIO(urllib.urlencode(form_data))) 
    208         file("/tmp/b24.3.1.html","wb").write(res.getBody()) 
    209  
    210         # self.assertNotEqual(res.status, 200) 
     192        self.assertNotEqual(res.status, 200) 
    211193 
    212194 
Note: See TracChangeset for help on using the changeset viewer.