Changeset 175


Ignore:
Timestamp:
05/11/09 18:40:13 (5 years ago)
Author:
brent
Message:

Added tests for CCReader, refactored CCReader to remove extra code.

Location:
collective.imstransport/trunk/collective/imstransport
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • collective.imstransport/trunk/collective/imstransport/tests/base.py

    r172 r175  
    3737    """ Test Class """ 
    3838 
     39 
    3940class IMSTransportFunctionalTestCase(FunctionalTestCase, IMSTransportTestCase): 
    4041    """ Functional test class """ 
  • collective.imstransport/trunk/collective/imstransport/utilities/imscc/ccreader.py

    r160 r175  
    33class CCReader(object): 
    44 
    5     def __init__(self, context, source): 
     5    def __init__(self): 
    66        """ 
    77        """ 
    8         self.context = context 
    98        self.document = None 
    109        self.orgdata = {} 
     
    1716        self.document = minidom.parseString(manifest) 
    1817 
    19  
    20     def readManifests(self): 
     18    def readOrganizations(self): 
    2119        """ Read the organizations section of the manifest. """ 
    2220        self.org = {} 
    2321        organizations = self.document.getElementsByTagName('organizations') 
    2422        if organizations: 
    25             self._readItems(self.context, organizations[0]) 
    26         else: 
    27             raise ManifestError, 'Manifest file has no "organizations" section.' 
    28      
    29     def readOrganizations(self): 
    30         """ Read the organizations section of the manifest. """ 
    31         self.org = {} 
    32         organizations = self.document.getElementsByTagName('manifest') 
    33         if organizations: 
    34             return self._readItems(self.context, organizations[0]) 
     23            return self._readItems(organizations[0]) 
    3524        else: 
    3625            raise ManifestError, 'Manifest file has no "organizations" section.' 
    3726 
    38     def _readItems(self, object, orgs): 
     27    def _readItems(self, orgs): 
    3928        """ Read items from the manifest. """ 
    4029 
Note: See TracChangeset for help on using the changeset viewer.