Commit 33b330de authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

modify stepCheckPropertySheetExists and stepCreateUpdatedPropertySheet for portal_property_sheets.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43293 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 33f66045
...@@ -2427,14 +2427,14 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -2427,14 +2427,14 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
""" """
Check presence of Property Sheet Check presence of Property Sheet
""" """
ps_title = sequence.get('ps_title', None)
ps_path = sequence.get('ps_path', None) ps_path = sequence.get('ps_path', None)
ps_data = sequence.get('ps_data', None) ps_data = sequence.get('ps_data', None)
self.failUnless(ps_path is not None) self.failUnless(ps_path is not None)
self.failUnless(os.path.exists(ps_path)) # Property Sheet will not be installed in file sytem
# check data in property sheet self.failIf(os.path.exists(ps_path))
f = file(ps_path, 'r') # Property Sheet will be installed in ZODB
data = f.read() self.failUnless(getattr(self.portal.portal_property_sheets, ps_title, None) is not None)
self.assertEqual(data, ps_data)
def stepCheckPropertySheetRemoved(self, sequence=None, sequencer_list=None, **kw): def stepCheckPropertySheetRemoved(self, sequence=None, sequencer_list=None, **kw):
""" """
...@@ -2476,14 +2476,14 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -2476,14 +2476,14 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
""" """
Check presence of Property Sheet Check presence of Property Sheet
""" """
ps_title = sequence.get('ps_title', None)
ps_path = sequence.get('ps_path', None) ps_path = sequence.get('ps_path', None)
ps_data = sequence.get('ps_data_u', None) ps_data = sequence.get('ps_data_u', None)
self.failUnless(ps_path is not None) self.failUnless(ps_path is not None)
self.failUnless(os.path.exists(ps_path)) # Property Sheet will not be installed in file sytem
# check data in property sheet self.failIf(os.path.exists(ps_path))
f = file(ps_path, 'r') # Property Sheet will be installed in ZODB
data = f.read() self.failUnless(getattr(self.portal.portal_property_sheets, ps_title, None) is not None)
self.assertEqual(data, ps_data)
# Test Constraint # Test Constraint
def stepCreateConstraint(self, sequence=None, sequence_list=None, **kw): def stepCreateConstraint(self, sequence=None, sequence_list=None, **kw):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment