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
141
Merge Requests
141
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
39f65aca
Commit
39f65aca
authored
Feb 14, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
011cbd96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Type.py
...tTemplateItem/portal_components/test.erp5.testERP5Type.py
+4
-5
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.SimulationTool.py
...emplateItem/portal_components/tool.erp5.SimulationTool.py
+1
-1
product/ERP5/tests/testInventoryAPI.py
product/ERP5/tests/testInventoryAPI.py
+2
-2
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Type.py
View file @
39f65aca
...
@@ -464,12 +464,11 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
...
@@ -464,12 +464,11 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
return
row
.
title
return
row
.
title
modified_title
=
getTitleFromCatalog
()
+
'_not_reindexed'
modified_title
=
getTitleFromCatalog
()
+
'_not_reindexed'
catalog_connection
=
self
.
getSQLConnection
()()
catalog_connection
=
self
.
getSQLConnection
()()
catalog_connection
.
query
(
bytes
(
catalog_connection
.
query
(
'UPDATE catalog SET title=%s WHERE uid=%i'
%
(
b
'UPDATE catalog SET title=%s WHERE uid=%i'
%
(
catalog_connection
.
string_literal
(
modified_title
),
catalog_connection
.
string_literal
(
modified_title
),
person_object
.
getUid
(),
person_object
.
getUid
(),
),
))
))
self
.
commit
()
self
.
commit
()
# sanity check
# sanity check
self
.
assertEqual
(
getTitleFromCatalog
(),
modified_title
)
self
.
assertEqual
(
getTitleFromCatalog
(),
modified_title
)
...
@@ -2381,7 +2380,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
...
@@ -2381,7 +2380,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
foo
.
getRegionList
())
foo
.
getRegionList
())
# using relations to non existant objects will issue a warning in
# using relations to non existant objects will issue a warning in
# event.log
# event.log
self
.
_catch_log_errors
(
ignored_level
=
sys
.
maxint
)
self
.
_catch_log_errors
(
ignored_level
=
2
**
32
)
self
.
assertEqual
([
beta
],
self
.
assertEqual
([
beta
],
foo
.
getRegionValueList
())
foo
.
getRegionValueList
())
self
.
assertEqual
([
beta_title
],
self
.
assertEqual
([
beta_title
],
...
...
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.SimulationTool.py
View file @
39f65aca
...
@@ -1613,7 +1613,7 @@ class SimulationTool(BaseTool):
...
@@ -1613,7 +1613,7 @@ class SimulationTool(BaseTool):
line_key
=
getInventoryListKey
(
line
)
line_key
=
getInventoryListKey
(
line
)
line_a
=
inventory_list_dict
.
get
(
line_key
)
line_a
=
inventory_list_dict
.
get
(
line_key
)
inventory_list_dict
[
line_key
]
=
addLineValues
(
line_a
,
line
)
inventory_list_dict
[
line_key
]
=
addLineValues
(
line_a
,
line
)
sorted_inventory_list
=
inventory_list_dict
.
values
(
)
sorted_inventory_list
=
list
(
inventory_list_dict
.
values
()
)
# Sort results manually when required
# Sort results manually when required
sort_on
=
new_kw
.
get
(
'sort_on'
)
sort_on
=
new_kw
.
get
(
'sort_on'
)
if
sort_on
:
if
sort_on
:
...
...
product/ERP5/tests/testInventoryAPI.py
View file @
39f65aca
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
TODO: test variation
TODO: test variation
test selection_report
test selection_report
"""
"""
from
__future__
import
division
import
os
import
os
import
random
import
random
import
unittest
import
unittest
...
@@ -2974,7 +2974,7 @@ class TestInventoryCacheTable(InventoryAPITestCase):
...
@@ -2974,7 +2974,7 @@ class TestInventoryCacheTable(InventoryAPITestCase):
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
InventoryAPITestCase
.
afterSetUp
(
self
)
InventoryAPITestCase
.
afterSetUp
(
self
)
self
.
CACHE_LAG
=
cache_lag
=
self
.
getSimulationTool
().
getInventoryCacheLag
()
self
.
CACHE_LAG
=
cache_lag
=
self
.
getSimulationTool
().
getInventoryCacheLag
()
min_lag
=
cache_lag
/
2
min_lag
=
cache_lag
/
/
2
self
.
NOW
=
now
=
DateTime
(
DateTime
().
strftime
(
"%Y-%m-%d %H:%M:%S UTC"
))
self
.
NOW
=
now
=
DateTime
(
DateTime
().
strftime
(
"%Y-%m-%d %H:%M:%S UTC"
))
self
.
CACHE_DATE
=
cache_date
=
now
-
min_lag
self
.
CACHE_DATE
=
cache_date
=
now
-
min_lag
from
erp5.component.tool.SimulationTool
import
MYSQL_MIN_DATETIME_RESOLUTION
from
erp5.component.tool.SimulationTool
import
MYSQL_MIN_DATETIME_RESOLUTION
...
...
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