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
e0fcd76d
Commit
e0fcd76d
authored
Oct 01, 2022
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! py2/py3: stop using deprecated urllib.split* functions.
parent
2c74f3ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testBusinessTemplate.py
...eItem/portal_components/test.erp5.testBusinessTemplate.py
+8
-8
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testBusinessTemplate.py
View file @
e0fcd76d
...
@@ -2494,7 +2494,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
...
@@ -2494,7 +2494,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
while
import_id
in
template_tool
.
objectIds
():
while
import_id
in
template_tool
.
objectIds
():
n
=
n
+
1
n
=
n
+
1
import_id
=
"%s_%s"
%
(
import_id
,
n
)
import_id
=
"%s_%s"
%
(
import_id
,
n
)
template_tool
.
download
(
url
=
'file:'
+
template_path
,
id
=
import_id
)
template_tool
.
download
(
url
=
'file:
//
'
+
template_path
,
id
=
import_id
)
import_bt
=
template_tool
.
_getOb
(
id
=
import_id
)
import_bt
=
template_tool
.
_getOb
(
id
=
import_id
)
self
.
assertFalse
(
import_bt
is
None
)
self
.
assertFalse
(
import_bt
is
None
)
self
.
assertEqual
(
import_bt
.
getPortalType
(),
'Business Template'
)
self
.
assertEqual
(
import_bt
.
getPortalType
(),
'Business Template'
)
...
@@ -5052,7 +5052,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
...
@@ -5052,7 +5052,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
bt
.
export
(
path
=
export_dir
,
local
=
True
)
bt
.
export
(
path
=
export_dir
,
local
=
True
)
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_templates
.
updateBusinessTemplateFromUrl
(
self
.
portal
.
portal_templates
.
updateBusinessTemplateFromUrl
(
download_url
=
'file:/%s'
%
export_dir
)
download_url
=
'file:/
/
%s'
%
export_dir
)
finally
:
finally
:
shutil
.
rmtree
(
export_dir
)
shutil
.
rmtree
(
export_dir
)
...
@@ -5072,7 +5072,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
...
@@ -5072,7 +5072,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
bt
.
export
(
path
=
export_dir
,
local
=
True
)
bt
.
export
(
path
=
export_dir
,
local
=
True
)
self
.
tic
()
self
.
tic
()
new_bt
=
self
.
portal
.
portal_templates
.
updateBusinessTemplateFromUrl
(
new_bt
=
self
.
portal
.
portal_templates
.
updateBusinessTemplateFromUrl
(
download_url
=
'file:/%s'
%
export_dir
)
download_url
=
'file:/
/
%s'
%
export_dir
)
finally
:
finally
:
shutil
.
rmtree
(
export_dir
)
shutil
.
rmtree
(
export_dir
)
...
@@ -6379,7 +6379,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
...
@@ -6379,7 +6379,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
[
os
.
path
.
basename
(
f
)
for
f
in
[
os
.
path
.
basename
(
f
)
for
f
in
glob
.
glob
(
'%s/%s/*'
%
(
export_dir
,
template_item
))])
glob
.
glob
(
'%s/%s/*'
%
(
export_dir
,
template_item
))])
new_bt
=
self
.
portal
.
portal_templates
.
download
(
new_bt
=
self
.
portal
.
portal_templates
.
download
(
url
=
'file:/%s'
%
export_dir
)
url
=
'file:/
/
%s'
%
export_dir
)
finally
:
finally
:
shutil
.
rmtree
(
export_dir
)
shutil
.
rmtree
(
export_dir
)
...
@@ -6457,7 +6457,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
...
@@ -6457,7 +6457,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
bt
.
export
(
path
=
export_dir
,
local
=
True
)
bt
.
export
(
path
=
export_dir
,
local
=
True
)
self
.
tic
()
self
.
tic
()
new_bt
=
self
.
portal
.
portal_templates
.
download
(
new_bt
=
self
.
portal
.
portal_templates
.
download
(
url
=
'file:/%s'
%
export_dir
)
url
=
'file:/
/
%s'
%
export_dir
)
finally
:
finally
:
shutil
.
rmtree
(
export_dir
)
shutil
.
rmtree
(
export_dir
)
...
@@ -6489,7 +6489,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
...
@@ -6489,7 +6489,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
bt
.
export
(
path
=
export_dir
,
local
=
True
)
bt
.
export
(
path
=
export_dir
,
local
=
True
)
self
.
tic
()
self
.
tic
()
new_bt
=
self
.
portal
.
portal_templates
.
download
(
new_bt
=
self
.
portal
.
portal_templates
.
download
(
url
=
'file:/%s'
%
export_dir
)
url
=
'file:/
/
%s'
%
export_dir
)
finally
:
finally
:
shutil
.
rmtree
(
export_dir
)
shutil
.
rmtree
(
export_dir
)
...
@@ -6526,7 +6526,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
...
@@ -6526,7 +6526,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
[
os
.
path
.
basename
(
f
)
for
f
in
[
os
.
path
.
basename
(
f
)
for
f
in
glob
.
glob
(
'%s/ActionTemplateItem/portal_types/*'
%
(
export_dir
,
))])
glob
.
glob
(
'%s/ActionTemplateItem/portal_types/*'
%
(
export_dir
,
))])
new_bt
=
self
.
portal
.
portal_templates
.
download
(
new_bt
=
self
.
portal
.
portal_templates
.
download
(
url
=
'file:/%s'
%
export_dir
)
url
=
'file:/
/
%s'
%
export_dir
)
finally
:
finally
:
shutil
.
rmtree
(
export_dir
)
shutil
.
rmtree
(
export_dir
)
...
@@ -6568,7 +6568,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
...
@@ -6568,7 +6568,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
bt
.
export
(
path
=
export_dir
,
local
=
True
)
bt
.
export
(
path
=
export_dir
,
local
=
True
)
self
.
tic
()
self
.
tic
()
new_bt
=
self
.
portal
.
portal_templates
.
download
(
new_bt
=
self
.
portal
.
portal_templates
.
download
(
url
=
'file:/%s'
%
export_dir
)
url
=
'file:/
/
%s'
%
export_dir
)
finally
:
finally
:
shutil
.
rmtree
(
export_dir
)
shutil
.
rmtree
(
export_dir
)
...
...
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