Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.exportimport.tests.test_properties.importSitePropertiesTests Class Reference
Inheritance diagram for CMFCore.exportimport.tests.test_properties.importSitePropertiesTests:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.exportimport.tests.test_properties.importSitePropertiesTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_empty_default_purge
def test_empty_explicit_purge
def test_empty_skip_purge
def test_normal

Static Public Attributes

 layer = ExportImportZCMLLayer

Detailed Description

Definition at line 153 of file test_properties.py.


Member Function Documentation

Definition at line 157 of file test_properties.py.

00157 
00158     def test_empty_default_purge(self):
00159         from Products.CMFCore.exportimport.properties \
00160                 import importSiteProperties
00161 
00162         site = self._initSite()
00163 
00164         self.assertEqual( len( site.propertyIds() ), 4 )
00165         self.failUnless( 'foo' in site.propertyIds() )
00166         self.assertEqual( site.getProperty('foo'), 'Foo' )
00167         self.failUnless( 'bar' in site.propertyIds() )
00168         self.assertEqual( site.getProperty('bar'), ('Bar',) )
00169 
00170         context = DummyImportContext(site)
00171         context._files['properties.xml'] = _EMPTY_EXPORT
00172         importSiteProperties(context)
00173 
00174         self.assertEqual( len( site.propertyIds() ), 1 )

Here is the call graph for this function:

Definition at line 175 of file test_properties.py.

00175 
00176     def test_empty_explicit_purge(self):
00177         from Products.CMFCore.exportimport.properties \
00178                 import importSiteProperties
00179 
00180         site = self._initSite()
00181 
00182         self.assertEqual( len( site.propertyIds() ), 4 )
00183         self.failUnless( 'foo' in site.propertyIds() )
00184         self.assertEqual( site.getProperty('foo'), 'Foo' )
00185         self.failUnless( 'bar' in site.propertyIds() )
00186         self.assertEqual( site.getProperty('bar'), ('Bar',) )
00187 
00188         context = DummyImportContext(site, True)
00189         context._files['properties.xml'] = _EMPTY_EXPORT
00190         importSiteProperties(context)
00191 
00192         self.assertEqual( len( site.propertyIds() ), 1 )

Here is the call graph for this function:

Definition at line 193 of file test_properties.py.

00193 
00194     def test_empty_skip_purge(self):
00195         from Products.CMFCore.exportimport.properties \
00196                 import importSiteProperties
00197 
00198         site = self._initSite()
00199 
00200         self.assertEqual( len( site.propertyIds() ), 4 )
00201         self.failUnless( 'foo' in site.propertyIds() )
00202         self.assertEqual( site.getProperty('foo'), 'Foo' )
00203         self.failUnless( 'bar' in site.propertyIds() )
00204         self.assertEqual( site.getProperty('bar'), ('Bar',) )
00205 
00206         context = DummyImportContext(site, False)
00207         context._files['properties.xml'] = _EMPTY_EXPORT
00208         importSiteProperties(context)
00209 
00210         self.assertEqual( len( site.propertyIds() ), 4 )
00211         self.failUnless( 'foo' in site.propertyIds() )
00212         self.assertEqual( site.getProperty('foo'), 'Foo' )
00213         self.failUnless( 'bar' in site.propertyIds() )
00214         self.assertEqual( site.getProperty('bar'), ('Bar',) )

Here is the call graph for this function:

Definition at line 215 of file test_properties.py.

00215 
00216     def test_normal(self):
00217         from Products.CMFCore.exportimport.properties \
00218                 import importSiteProperties
00219 
00220         site = self._initSite(0,0)
00221 
00222         self.assertEqual( len( site.propertyIds() ), 1 )
00223 
00224         context = DummyImportContext(site)
00225         context._files['properties.xml'] = _NORMAL_EXPORT
00226         importSiteProperties(context)
00227 
00228         self.assertEqual( len( site.propertyIds() ), 4 )
00229         self.failUnless( 'foo' in site.propertyIds() )
00230         self.assertEqual( site.getProperty('foo'), 'Foo' )
00231         self.failUnless( 'bar' in site.propertyIds() )
00232         self.assertEqual( site.getProperty('bar'), ('Bar',) )
00233 

Here is the call graph for this function:


Member Data Documentation

Definition at line 155 of file test_properties.py.


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