Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
7f575bb8
Commit
7f575bb8
authored
Feb 24, 2022
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core_test testERP5Catalog: Assorted style improvements.
parent
c06e2069
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Catalog.py
...mplateItem/portal_components/test.erp5.testERP5Catalog.py
+6
-11
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Catalog.py
View file @
7f575bb8
...
...
@@ -605,26 +605,21 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
sql
=
"""select creation_date, modification_date
from catalog where uid = %s"""
%
organisation
.
getUid
()
result
=
sql_connection
.
manage_test
(
sql
)
self
.
assertEqual
(
creation_date
,
result
[
0
][
'creation_date'
].
ISO
())
self
.
assertEqual
(
modification_date
,
result
[
0
][
'modification_date'
].
ISO
())
self
.
assertEqual
(
creation_date
,
result
[
0
][
'creation_date'
].
ISO
())
self
.
assertEqual
(
modification_date
,
result
[
0
][
'modification_date'
].
ISO
())
import
time
;
time
.
sleep
(
3
)
organisation
.
edit
(
title
=
'edited'
)
self
.
tic
()
result
=
sql_connection
.
manage_test
(
sql
)
self
.
assertEqual
(
creation_date
,
result
[
0
][
'creation_date'
].
ISO
())
modification_date
=
organisation
.
getModificationDate
().
toZone
(
'UTC'
).
ISO
()
self
.
assertNotEquals
(
modification_date
,
organisation
.
getCreationDate
())
self
.
assertNotEqual
(
modification_date
,
organisation
.
getCreationDate
())
# This test was first written with a now variable initialized with
# DateTime(). But since we are never sure of the time required in
# order to execute some line of code
self
.
assertEqual
(
modification_date
,
result
[
0
][
'modification_date'
].
ISO
())
self
.
assertTrue
(
organisation
.
getModificationDate
()
>
now
)
self
.
assertTrue
(
result
[
0
][
'creation_date'
]
<
result
[
0
][
'modification_date'
])
self
.
assertEqual
(
modification_date
,
result
[
0
][
'modification_date'
].
ISO
())
self
.
assertGreater
(
organisation
.
getModificationDate
(),
now
)
self
.
assertLesser
(
result
[
0
][
'creation_date'
],
result
[
0
][
'modification_date'
])
def
test_19_SearchFolderWithNonAsciiCharacter
(
self
):
person_module
=
self
.
getPersonModule
()
...
...
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