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
Levin Zimmermann
erp5
Commits
a84dac8a
Commit
a84dac8a
authored
Jul 08, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: ZODB Components: Migrate testOOoStyle{WithFlare} and split it into 2 tests (ODT, ODS).
parent
ffc360ac
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
755 additions
and
48 deletions
+755
-48
bt5/erp5_base/ModuleComponentTemplateItem/portal_components/module.erp5.OOoTestUtil.py
...TemplateItem/portal_components/module.erp5.OOoTestUtil.py
+100
-23
bt5/erp5_base/ModuleComponentTemplateItem/portal_components/module.erp5.OOoTestUtil.xml
...emplateItem/portal_components/module.erp5.OOoTestUtil.xml
+110
-0
bt5/erp5_base/bt/template_module_component_id_list
bt5/erp5_base/bt/template_module_component_id_list
+2
-1
bt5/erp5_ods_style/TestTemplateItem/portal_components/test.erp5.testODSStyle.py
...tTemplateItem/portal_components/test.erp5.testODSStyle.py
+39
-0
bt5/erp5_ods_style/TestTemplateItem/portal_components/test.erp5.testODSStyle.xml
...TemplateItem/portal_components/test.erp5.testODSStyle.xml
+104
-0
bt5/erp5_ods_style/TestTemplateItem/portal_components/test.erp5.testODSStyleWithFlare.py
...Item/portal_components/test.erp5.testODSStyleWithFlare.py
+2
-23
bt5/erp5_ods_style/TestTemplateItem/portal_components/test.erp5.testODSStyleWithFlare.xml
...tem/portal_components/test.erp5.testODSStyleWithFlare.xml
+104
-0
bt5/erp5_ods_style/bt/template_test_id_list
bt5/erp5_ods_style/bt/template_test_id_list
+2
-0
bt5/erp5_ods_style/bt/test_dependency_list
bt5/erp5_ods_style/bt/test_dependency_list
+4
-0
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testODTStyle.py
...tTemplateItem/portal_components/test.erp5.testODTStyle.py
+39
-0
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testODTStyle.xml
...TemplateItem/portal_components/test.erp5.testODTStyle.xml
+104
-0
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testODTStyleWithFlare.py
...Item/portal_components/test.erp5.testODTStyleWithFlare.py
+39
-0
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testODTStyleWithFlare.xml
...tem/portal_components/test.erp5.testODTStyleWithFlare.xml
+104
-0
bt5/erp5_odt_style/bt/template_test_id_list
bt5/erp5_odt_style/bt/template_test_id_list
+2
-0
product/ERP5OOo/tests/__init__.py
product/ERP5OOo/tests/__init__.py
+0
-1
No files found.
product/ERP5OOo/tests/testOOoStyle
.py
→
bt5/erp5_base/ModuleComponentTemplateItem/portal_components/module.erp5.OOoTestUtil
.py
View file @
a84dac8a
...
@@ -27,19 +27,101 @@
...
@@ -27,19 +27,101 @@
#
#
##############################################################################
##############################################################################
import
unittest
"""This module provides utilities for testing ODF files.
Validator: a class defining a `validate` method that expects odf file content
as first argument and returns list of errors.
"""
import
os
import
sys
import
tempfile
import
zipfile
import
popen2
from
cStringIO
import
StringIO
try
:
import
lxml
except
ImportError
:
lxml
=
None
try
:
import
odfpy
except
ImportError
:
odfpy
=
None
if
lxml
:
class
LXMLValidator
:
"""Validate ODF document using RelaxNG and lxml"""
schema_url
=
\
'http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-schema-v1.1.rng'
def
__init__
(
self
,
schema_url
=
schema_url
):
self
.
schema_url
=
schema_url
self
.
schema_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
path
.
basename
(
schema_url
))
self
.
relaxng
=
lxml
.
etree
.
RelaxNG
(
lxml
.
etree
.
parse
(
self
.
schema_path
))
def
validate
(
self
,
odf_file_content
):
error_list
=
[]
odf_file
=
StringIO
(
odf_file_content
)
for
f
in
(
'content.xml'
,
'meta.xml'
,
'styles.xml'
,
'settings.xml'
):
error_list
.
extend
(
self
.
_validateXML
(
odf_file
,
f
))
return
error_list
def
_validateXML
(
self
,
odf_file
,
content_file_name
):
zfd
=
zipfile
.
ZipFile
(
odf_file
)
lxml
.
etree
.
parse
(
StringIO
(
zfd
.
read
(
content_file_name
)))
return
[]
"""
# The following is the past implementation that validates with
# RelaxNG schema. But recent LibreOffice uses extended odf
# format by default, that does not pass the RelaxNG validation.
doc.docinfo.URL = content_file_name
self.relaxng.validate(doc)
return [error for error in str(self.relaxng.error_log).splitlines(True)]
"""
Validator
=
LXMLValidator
elif
odfpy
:
class
OdflintValidator
:
"""Validates ODF files using odflint, available on pypi
http://opendocumentfellowship.org/development/projects/odfpy
"""
def
validate
(
self
,
odf_file_content
):
fd
,
file_name
=
tempfile
.
mkstemp
()
os
.
write
(
fd
,
odf_file_content
)
os
.
close
(
fd
)
stdout
,
stdin
=
popen2
.
popen4
(
'odflint %s'
%
file_name
)
stdin
.
close
()
error_list
=
''
for
line
in
stdout
:
if
line
.
startswith
(
'Error: '
):
error_list
+=
line
os
.
unlink
(
file_name
)
return
error_list
Validator
=
OdflintValidator
else
:
class
NoValidator
:
"""Does not actually validate, but keep the interface."""
def
validate
(
self
,
odf_file_content
):
print
>>
sys
.
stderr
,
'No validator available'
Validator
=
NoValidator
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.utils
import
DummyLocalizer
from
Products.ERP5Type.tests.utils
import
DummyLocalizer
from
Products.ERP5Form.Selection
import
Selection
from
Products.ERP5Form.Selection
import
Selection
from
Testing
import
ZopeTestCase
from
Testing
import
ZopeTestCase
from
Products.ERP5OOo.tests.utils
import
Validator
import
httplib
import
httplib
HTTP_OK
=
httplib
.
OK
HTTP_OK
=
httplib
.
OK
# setting this to True allows the .publish() calls to provide tracebacks
# setting this to True allows the .publish() calls to provide tracebacks
debug
=
False
debug
=
False
class
TestOOoStyle
(
ERP5TypeTestCase
,
ZopeTestCase
.
Functional
):
class
TestOOoStyle
(
ERP5TypeTestCase
,
ZopeTestCase
.
Functional
):
"""Tests ODF styles for ERP5."""
"""Tests ODF styles for ERP5."""
skin
=
None
skin
=
None
...
@@ -71,7 +153,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -71,7 +153,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
person_module
.
pers
.
newContent
(
portal_type
=
'Embedded File'
,
id
=
'img'
)
person_module
.
pers
.
newContent
(
portal_type
=
'Embedded File'
,
id
=
'img'
)
if
person_module
.
_getOb
(
'pers_without_image'
,
None
)
is
None
:
if
person_module
.
_getOb
(
'pers_without_image'
,
None
)
is
None
:
person
=
person
_module
.
newContent
(
person_module
.
newContent
(
portal_type
=
'Person'
,
portal_type
=
'Person'
,
id
=
'pers_without_image'
,
id
=
'pers_without_image'
,
first_name
=
'Test'
)
first_name
=
'Test'
)
...
@@ -385,7 +467,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -385,7 +467,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
if
self
.
skin
==
'ODT'
:
if
self
.
skin
==
'ODT'
:
# Is it good to do this only for ODT ?
# Is it good to do this only for ODT ?
from
Products.ERP5OOo
.OOoUtils
import
OOoParser
from
erp5.component.module
.OOoUtils
import
OOoParser
parser
=
OOoParser
()
parser
=
OOoParser
()
parser
.
openFromString
(
body
)
parser
.
openFromString
(
body
)
content_xml
=
parser
.
oo_files
[
'content.xml'
]
content_xml
=
parser
.
oo_files
[
'content.xml'
]
...
@@ -415,7 +497,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -415,7 +497,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
body
=
response
.
getBody
()
body
=
response
.
getBody
()
self
.
_validate
(
body
)
self
.
_validate
(
body
)
from
Products.ERP5OOo
.OOoUtils
import
OOoParser
from
erp5.component.module
.OOoUtils
import
OOoParser
parser
=
OOoParser
()
parser
=
OOoParser
()
parser
.
openFromString
(
body
)
parser
.
openFromString
(
body
)
content_xml
=
parser
.
oo_files
[
'content.xml'
]
content_xml
=
parser
.
oo_files
[
'content.xml'
]
...
@@ -455,19 +537,14 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -455,19 +537,14 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
assertFalse
(
response
.
getHeader
(
'content-disposition'
))
self
.
assertFalse
(
response
.
getHeader
(
'content-disposition'
))
self
.
assertTrue
(
'office:document-content'
in
response
.
getBody
())
self
.
assertTrue
(
'office:document-content'
in
response
.
getBody
())
class
TestODTStyle
(
TestOOoStyle
):
class
TestOOoStyleWithFlare
(
TestOOoStyle
):
skin
=
'ODT'
"""Tests ODF styles for ERP5 with Flare."""
content_type
=
'application/vnd.oasis.opendocument.text'
def
getTitle
(
self
):
return
"Test OOo Style with Flare"
class
TestODSStyle
(
TestOOoStyle
):
skin
=
'ODS'
content_type
=
'application/vnd.oasis.opendocument.spreadsheet'
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestODTStyle
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestODSStyle
))
return
suite
def
afterSetUp
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
default_pref
.
setPreferredConversionCacheFactory
(
'dms_cache_factory'
)
if
default_pref
.
getPreferenceState
()
!=
'global'
:
default_pref
.
enable
()
TestOOoStyle
.
afterSetUp
(
self
)
bt5/erp5_base/ModuleComponentTemplateItem/portal_components/module.erp5.OOoTestUtil.xml
0 → 100644
View file @
a84dac8a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Module Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
OOoTestUtil
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.utils
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
module.erp5.OOoTestUtil
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Module Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_base/bt/template_module_component_id_list
View file @
a84dac8a
module.erp5.ImageUtil
module.erp5.TransformImageToBmp
module.erp5.TransformImageToBmp
module.erp5.TransformImageToPcx
module.erp5.TransformImageToPcx
module.erp5.TransformLib
module.erp5.TransformLib
module.erp5.ImageUtil
module.erp5.OOoTestUtil
\ No newline at end of file
\ No newline at end of file
product/ERP5OOo/tests/utils
.py
→
bt5/erp5_ods_style/TestTemplateItem/portal_components/test.erp5.testODSStyle
.py
View file @
a84dac8a
# -*- coding: utf-8 -*-
##############################################################################
##############################################################################
#
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
...
@@ -26,90 +27,13 @@
...
@@ -26,90 +27,13 @@
#
#
##############################################################################
##############################################################################
"""This module provides utilities for testing ODF files.
from
erp5.component.module.OOoTestUtil
import
TestOOoStyle
class
TestODSStyle
(
TestOOoStyle
):
Validator: a class defining a `validate` method that expects odf file content
skin
=
'ODS'
as first argument and returns list of errors.
content_type
=
'application/vnd.oasis.opendocument.spreadsheet'
"""
import
os
import
sys
import
tempfile
import
zipfile
import
popen2
import
urllib2
from
cStringIO
import
StringIO
try
:
import
lxml
except
ImportError
:
lxml
=
None
try
:
import
odfpy
except
ImportError
:
odfpy
=
None
if
lxml
:
class
LXMLValidator
:
"""Validate ODF document using RelaxNG and lxml"""
schema_url
=
\
'http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-schema-v1.1.rng'
def
__init__
(
self
,
schema_url
=
schema_url
):
self
.
schema_url
=
schema_url
self
.
schema_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
path
.
basename
(
schema_url
))
self
.
relaxng
=
lxml
.
etree
.
RelaxNG
(
lxml
.
etree
.
parse
(
self
.
schema_path
))
def
validate
(
self
,
odf_file_content
):
error_list
=
[]
odf_file
=
StringIO
(
odf_file_content
)
for
f
in
(
'content.xml'
,
'meta.xml'
,
'styles.xml'
,
'settings.xml'
):
error_list
.
extend
(
self
.
_validateXML
(
odf_file
,
f
))
return
error_list
def
_validateXML
(
self
,
odf_file
,
content_file_name
):
zfd
=
zipfile
.
ZipFile
(
odf_file
)
doc
=
lxml
.
etree
.
parse
(
StringIO
(
zfd
.
read
(
content_file_name
)))
return
[]
# The following is the past implementation that validates with
# RelaxNG schema. But recent LibreOffice uses extended odf
# format by default, that does not pass the RelaxNG validation.
doc
.
docinfo
.
URL
=
content_file_name
self
.
relaxng
.
validate
(
doc
)
return
[
error
for
error
in
str
(
self
.
relaxng
.
error_log
).
splitlines
(
True
)]
Validator
=
LXMLValidator
elif
odfpy
:
class
OdflintValidator
:
"""Validates ODF files using odflint, available on pypi
http://opendocumentfellowship.org/development/projects/odfpy
"""
def
validate
(
self
,
odf_file_content
):
fd
,
file_name
=
tempfile
.
mkstemp
()
os
.
write
(
fd
,
odf_file_content
)
os
.
close
(
fd
)
stdout
,
stdin
=
popen2
.
popen4
(
'odflint %s'
%
file_name
)
stdin
.
close
()
error_list
=
''
for
line
in
stdout
:
if
line
.
startswith
(
'Error: '
):
error_list
+=
line
os
.
unlink
(
file_name
)
return
error_list
Validator
=
OdflintValidator
else
:
class
NoValidator
:
"""Does not actually validate, but keep the interface."""
def
validate
(
self
,
odf_file_content
):
print
>>
sys
.
stderr
,
'No validator available'
Validator
=
NoValidator
def
test_suite
():
import
unittest
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestODSStyle
))
return
suite
bt5/erp5_ods_style/TestTemplateItem/portal_components/test.erp5.testODSStyle.xml
0 → 100644
View file @
a84dac8a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testODSStyle
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testOOoStyle
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testODSStyle
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5OOo/tests/testOOo
StyleWithFlare.py
→
bt5/erp5_ods_style/TestTemplateItem/portal_components/test.erp5.testODS
StyleWithFlare.py
View file @
a84dac8a
...
@@ -26,35 +26,14 @@
...
@@ -26,35 +26,14 @@
#
#
##############################################################################
##############################################################################
import
unittest
from
erp5.component.module.OOoTestUtil
import
TestOOoStyleWithFlare
from
testOOoStyle
import
TestOOoStyle
class
TestOOoStyleWithFlare
(
TestOOoStyle
):
"""Tests ODF styles for ERP5 with Flare."""
def
getTitle
(
self
):
return
"Test OOo Style with Flare"
def
afterSetUp
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
default_pref
.
setPreferredConversionCacheFactory
(
'dms_cache_factory'
)
if
default_pref
.
getPreferenceState
()
!=
'global'
:
default_pref
.
enable
()
TestOOoStyle
.
afterSetUp
(
self
)
class
TestODTStyle
(
TestOOoStyleWithFlare
):
skin
=
'ODT'
content_type
=
'application/vnd.oasis.opendocument.text'
class
TestODSStyle
(
TestOOoStyleWithFlare
):
class
TestODSStyle
(
TestOOoStyleWithFlare
):
skin
=
'ODS'
skin
=
'ODS'
content_type
=
'application/vnd.oasis.opendocument.spreadsheet'
content_type
=
'application/vnd.oasis.opendocument.spreadsheet'
def
test_suite
():
def
test_suite
():
import
unittest
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestODTStyle
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestODSStyle
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestODSStyle
))
return
suite
return
suite
bt5/erp5_ods_style/TestTemplateItem/portal_components/test.erp5.testODSStyleWithFlare.xml
0 → 100644
View file @
a84dac8a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testODSStyleWithFlare
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testOOoStyleWithFlare
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testODSStyleWithFlare
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ods_style/bt/template_test_id_list
0 → 100644
View file @
a84dac8a
test.erp5.testODSStyle
test.erp5.testODSStyleWithFlare
\ No newline at end of file
bt5/erp5_ods_style/bt/test_dependency_list
0 → 100644
View file @
a84dac8a
erp5_full_text_mroonga_catalog
erp5_base
erp5_ui_test
erp5_core_proxy_field_legacy
\ No newline at end of file
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testODTStyle.py
0 → 100644
View file @
a84dac8a
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
erp5.component.module.OOoTestUtil
import
TestOOoStyle
class
TestODTStyle
(
TestOOoStyle
):
skin
=
'ODT'
content_type
=
'application/vnd.oasis.opendocument.text'
def
test_suite
():
import
unittest
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestODTStyle
))
return
suite
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testODTStyle.xml
0 → 100644
View file @
a84dac8a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testODTStyle
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testOOoStyle
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testODTStyle
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testODTStyleWithFlare.py
0 → 100644
View file @
a84dac8a
# -*- coding: utf-8 -*-
##############################################################################
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Nicolas Delaby <nicolas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
erp5.component.module.OOoTestUtil
import
TestOOoStyleWithFlare
class
TestODTStyle
(
TestOOoStyleWithFlare
):
skin
=
'ODT'
content_type
=
'application/vnd.oasis.opendocument.text'
def
test_suite
():
import
unittest
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestODTStyle
))
return
suite
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testODTStyleWithFlare.xml
0 → 100644
View file @
a84dac8a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testODTStyleWithFlare
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testOOoStyleWithFlare
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testODTStyleWithFlare
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_odt_style/bt/template_test_id_list
View file @
a84dac8a
test.erp5.testFormPrintoutAsODG
test.erp5.testFormPrintoutAsODG
test.erp5.testFormPrintoutAsODT
test.erp5.testFormPrintoutAsODT
test.erp5.testODTStyle
test.erp5.testODTStyleWithFlare
test.erp5.testOOoDynamicStyle
test.erp5.testOOoDynamicStyle
\ No newline at end of file
product/ERP5OOo/tests/__init__.py
deleted
100644 → 0
View file @
ffc360ac
# make this directory a package
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