Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alain Takoudjou
erp5
Commits
83c5e54f
Commit
83c5e54f
authored
Mar 05, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testForm: remove test on sub form since datetimefield do not use sub form
parent
1311964f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
17 deletions
+1
-17
product/ERP5Form/tests/testFields.py
product/ERP5Form/tests/testFields.py
+1
-5
product/Formulator/tests/testForm.py
product/Formulator/tests/testForm.py
+0
-12
No files found.
product/ERP5Form/tests/testFields.py
View file @
83c5e54f
...
@@ -755,8 +755,6 @@ class TestProxyField(ERP5TypeTestCase):
...
@@ -755,8 +755,6 @@ class TestProxyField(ERP5TypeTestCase):
self
.
assertEqual
(
'Other'
,
proxy_field
.
get_value
(
'title'
))
self
.
assertEqual
(
'Other'
,
proxy_field
.
get_value
(
'title'
))
def
test_proxy_to_date_time_field
(
self
):
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
,
original_field
=
self
.
addField
(
self
.
container
.
Base_viewProxyFieldLibrary
,
'my_date'
,
'Date'
,
'DateTimeField'
)
'my_date'
,
'Date'
,
'DateTimeField'
)
original_field
.
manage_edit_xmlrpc
(
dict
(
required
=
0
))
original_field
.
manage_edit_xmlrpc
(
dict
(
required
=
0
))
...
@@ -764,9 +762,7 @@ class TestProxyField(ERP5TypeTestCase):
...
@@ -764,9 +762,7 @@ class TestProxyField(ERP5TypeTestCase):
'my_date'
,
'Date'
,
'ProxyField'
)
'my_date'
,
'Date'
,
'ProxyField'
)
proxy_field
.
manage_edit_xmlrpc
(
dict
(
form_id
=
'Base_viewProxyFieldLibrary'
,
proxy_field
.
manage_edit_xmlrpc
(
dict
(
form_id
=
'Base_viewProxyFieldLibrary'
,
field_id
=
'my_date'
,))
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
# we can render
proxy_field
.
render
()
proxy_field
.
render
()
# and validate
# and validate
...
...
product/Formulator/tests/testForm.py
View file @
83c5e54f
...
@@ -116,18 +116,6 @@ class FormTestCase(unittest.TestCase):
...
@@ -116,18 +116,6 @@ class FormTestCase(unittest.TestCase):
self
.
assertEqual
({
'int_field'
:
3
},
result
)
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
):
def
test_datetime_css_class_rendering
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment