Ignore:
Timestamp:
May 21, 2010 10:41:41 AM (14 years ago)
Author:
mylan
Message:

Fixed bugs, in converter, fix tests after renamed some convertor's methods

File:
1 edited

Legend:

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

    r2366 r2370  
    329329        self.convertor = CanonicalConvertor("http://domain.com") 
    330330 
    331     def test_convertPathToLink(self): 
     331    def test_convertIPathToLink(self): 
    332332        item = GoodItem("item") 
    333333        item._setProperty(PROPERTY_PATH, "/www/some/path") 
    334         self.convertor.convertPathToLink(item) 
     334        self.convertor.convertIPathToLink(item) 
    335335        result = ICanonicalLink(item).canonical_link 
    336336        expect = "http://domain.com/www/some/path" 
     
    340340    def test_convertBadItems(self): 
    341341        bad = NotProperyProviderItem("item") 
    342         self.convertor.convertPathToLink(bad) 
     342        self.convertor.convertIPathToLink(bad) 
    343343        result = self.convertor.getLogs() 
    344344        expect = "ERROR: exceptions.AttributeError: " \ 
     
    347347 
    348348        bad = NotAdaptableItem("item") 
    349         self.convertor.convertPathToLink(bad) 
     349        self.convertor.convertIPathToLink(bad) 
    350350        result = self.convertor.getLogs() 
    351351        expect = "ERROR: zope.component.interfaces.ComponentLookupError: " 
     
    354354    def test_loggingSuccess(self): 
    355355        good = GoodItem("item") 
    356         self.convertor.convertPathToLink(good) 
     356        self.convertor.convertIPathToLink(good) 
    357357        result = self.convertor.getLogs() 
    358358        expect = "SUCCESS" 
     
    363363        # and return full log anytime 
    364364        bad = NotProperyProviderItem("item") 
    365         self.convertor.convertPathToLink(bad) 
     365        self.convertor.convertIPathToLink(bad) 
    366366        logs = self.convertor.getLogs() 
    367367        logs2 = self.convertor.getLogs() 
     
    369369        self.assertEqual(logs == logs2, True, 
    370370             "logs not equal: \"%s\" != \"%s\"" % (logs, logs2)) 
    371         self.convertor.convertPathToLink(bad) 
     371        self.convertor.convertIPathToLink(bad) 
    372372        logs3 = self.convertor.getLogs() 
    373373        self.assertEqual(logs3 > logs2, True, 
     
    377377    def test_loggingCleanup(self): 
    378378        bad = NotProperyProviderItem("item") 
    379         self.convertor.convertPathToLink(bad) 
     379        self.convertor.convertIPathToLink(bad) 
    380380        assert self.convertor.getLogs() != "" 
    381381        self.convertor.cleanupLogs() 
Note: See TracChangeset for help on using the changeset viewer.