Back to index

plone3  3.1.7
Public Member Functions
GenericSetup.tests.test_profile_metadata.ProfileMetadataTests Class Reference
Inheritance diagram for GenericSetup.tests.test_profile_metadata.ProfileMetadataTests:
Inheritance graph
[legend]
Collaboration diagram for GenericSetup.tests.test_profile_metadata.ProfileMetadataTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_parseXML
def test_versionFromProduct
def test_relativePath

Detailed Description

Definition at line 48 of file test_profile_metadata.py.


Member Function Documentation

Definition at line 52 of file test_profile_metadata.py.

00052 
00053     def test_parseXML(self):
00054         metadata = ProfileMetadata( '' )
00055         parsed = metadata.parseXML( _METADATA_XML )
00056         self.assertEqual(parsed, _METADATA_MAP)

Definition at line 77 of file test_profile_metadata.py.

00077 
00078     def test_relativePath(self):
00079         profile_id = 'dummy_profile2'
00080         product_name = 'GenericSetup'
00081         profile_registry.registerProfile(
00082             profile_id, 'Dummy Profile', 'This is a dummy profile',
00083             'tests/metadata_profile', product=product_name)
00084         profile_info = profile_registry.getProfileInfo(
00085             '%s:%s' % (product_name, profile_id))
00086         self.assertEqual(profile_info['description'],
00087                          'Description from metadata')

Definition at line 57 of file test_profile_metadata.py.

00057 
00058     def test_versionFromProduct(self):
00059         import warnings
00060         warnings.filterwarnings('ignore')
00061         try:
00062             profile_id = 'dummy_profile'
00063             product_name = 'GenericSetup'
00064             directory = os.path.split(__file__)[0]
00065             path = os.path.join(directory, 'default_profile')
00066             profile_registry.registerProfile( profile_id,
00067                                               'Dummy Profile',
00068                                               'This is a dummy profile',
00069                                               path,
00070                                               product=product_name)
00071             profile_info = profile_registry.getProfileInfo(
00072                                 '%s:%s' % (product_name, profile_id))
00073             product = getattr(self.app.Control_Panel.Products, product_name)
00074             self.assertEqual(profile_info['version'], product.version)
00075         finally:
00076             warnings.resetwarnings()


The documentation for this class was generated from the following file: