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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
733c35fc
Commit
733c35fc
authored
Jul 12, 2024
by
Kazuhiko Shiozaki
Committed by
Arnaud Fontaine
Jul 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! XXX all changes to test (product)
parent
17cf1c5a
Pipeline
#35975
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+5
-9
No files found.
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
733c35fc
...
@@ -1454,7 +1454,7 @@ class TestZodbModuleComponent(SecurityTestCase):
...
@@ -1454,7 +1454,7 @@ class TestZodbModuleComponent(SecurityTestCase):
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
self
.
_component_tool
=
self
.
portal
.
portal_components
self
.
_component_tool
=
self
.
portal
.
portal_components
self
.
_module
=
__import__
(
self
.
_document_class
.
_getDynamicModuleNamespace
(),
self
.
_module
=
__import__
(
self
.
_document_class
.
_getDynamicModuleNamespace
(),
fromlist
=
[
'
erp5.component'
]
if
six
.
PY2
else
[
'erp5
'
])
fromlist
=
[
''
])
self
.
_component_tool
.
reset
(
force
=
True
,
self
.
_component_tool
.
reset
(
force
=
True
,
reset_portal_type_at_transaction_boundary
=
True
)
reset_portal_type_at_transaction_boundary
=
True
)
...
@@ -1524,10 +1524,7 @@ class TestZodbModuleComponent(SecurityTestCase):
...
@@ -1524,10 +1524,7 @@ class TestZodbModuleComponent(SecurityTestCase):
if
expected_default_version
is
not
None
:
if
expected_default_version
is
not
None
:
top_module_name
=
self
.
_document_class
.
_getDynamicModuleNamespace
()
top_module_name
=
self
.
_document_class
.
_getDynamicModuleNamespace
()
top_module
=
__import__
(
top_module
=
__import__
(
top_module_name
,
level
=
0
,
fromlist
=
[
''
])
top_module_name
,
level
=
0
,
fromlist
=
[
top_module_name
]
if
six
.
PY2
else
[
'erp5'
])
# The module must be available in its default version
# The module must be available in its default version
self
.
assertHasAttribute
(
top_module
,
expected_default_version
)
self
.
assertHasAttribute
(
top_module
,
expected_default_version
)
...
@@ -1558,8 +1555,7 @@ class TestZodbModuleComponent(SecurityTestCase):
...
@@ -1558,8 +1555,7 @@ class TestZodbModuleComponent(SecurityTestCase):
module_name
=
self
.
_getComponentFullModuleName
(
module_name
)
module_name
=
self
.
_getComponentFullModuleName
(
module_name
)
module
=
__import__
(
module
=
__import__
(
module_name
,
module_name
,
fromlist
=
[
self
.
_document_class
.
_getDynamicModuleNamespace
()]
fromlist
=
[
''
],
if
six
.
PY2
else
[
'erp5'
],
level
=
0
)
level
=
0
)
self
.
assertIn
(
module_name
,
sys
.
modules
)
self
.
assertIn
(
module_name
,
sys
.
modules
)
return
module
return
module
...
@@ -2052,7 +2048,7 @@ def bar(*args, **kwargs):
...
@@ -2052,7 +2048,7 @@ def bar(*args, **kwargs):
self
.
assertModuleImportable
(
'erp5_version.%s'
%
imported_reference
)
self
.
assertModuleImportable
(
'erp5_version.%s'
%
imported_reference
)
top_module
=
__import__
(
top_module_name
,
level
=
0
,
top_module
=
__import__
(
top_module_name
,
level
=
0
,
fromlist
=
[
top_module_name
]
if
six
.
PY2
else
[
'erp5
'
])
fromlist
=
[
'
'
])
self
.
_importModule
(
'erp5_version.%s'
%
imported_reference
)
self
.
_importModule
(
'erp5_version.%s'
%
imported_reference
)
...
@@ -2115,7 +2111,7 @@ def function_foo(*args, **kwargs):
...
@@ -2115,7 +2111,7 @@ def function_foo(*args, **kwargs):
top_module_name
=
self
.
_document_class
.
_getDynamicModuleNamespace
()
top_module_name
=
self
.
_document_class
.
_getDynamicModuleNamespace
()
top_module
=
__import__
(
top_module_name
,
level
=
0
,
top_module
=
__import__
(
top_module_name
,
level
=
0
,
fromlist
=
[
top_module_name
]
if
six
.
PY2
else
[
'erp5
'
])
fromlist
=
[
'
'
])
self
.
_importModule
(
reference
)
self
.
_importModule
(
reference
)
module
=
getattr
(
top_module
,
reference
)
module
=
getattr
(
top_module
,
reference
)
...
...
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