Commit 83c5e54f authored by Xiaowu Zhang's avatar Xiaowu Zhang

testForm: remove test on sub form since datetimefield do not use sub form

parent 1311964f
......@@ -755,8 +755,6 @@ class TestProxyField(ERP5TypeTestCase):
self.assertEqual('Other', proxy_field.get_value('title'))
def test_proxy_to_date_time_field(self):
# date time fields are specific, because they use a 'sub_form', we must
# make sure this works as expected
original_field = self.addField(self.container.Base_viewProxyFieldLibrary,
'my_date', 'Date', 'DateTimeField')
original_field.manage_edit_xmlrpc(dict(required=0))
......@@ -764,9 +762,7 @@ class TestProxyField(ERP5TypeTestCase):
'my_date', 'Date', 'ProxyField')
proxy_field.manage_edit_xmlrpc(dict(form_id='Base_viewProxyFieldLibrary',
field_id='my_date',))
self.assertTrue(hasattr(proxy_field, 'sub_form'))
self.assertTrue(aq_base(proxy_field.sub_form) is
aq_base(original_field.sub_form))
# we can render
proxy_field.render()
# and validate
......
......@@ -116,18 +116,6 @@ class FormTestCase(unittest.TestCase):
self.assertEqual({'int_field': 3}, result)
def test_datetime_timezone_rendering(self):
self.form.manage_addProduct['Formulator']\
.manage_addField('date_time','Test Field','DateTimeField')
field = self.form.date_time
sub_form = field.sub_form
if sub_form.has_field('timezone'):
del sub_form.fields['timezone']
#now timezone is not presented
self.assertFalse(self.form.date_time.sub_form.has_field('timezone'))
field._edit({'timezone_style': 1})
#test if timezone's presented
self.assertTrue(self.form.date_time.sub_form.has_field('timezone'))
def test_datetime_css_class_rendering(self):
......
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