- 09 Jun, 2024 15 commits
-
-
Jérome Perrin authored
This reverts 8a5f5b5b (ZMySQLDA: fix string_literal usage, 2023-03-14) to apply this logic one step lower, because CMFActivity uses db.string_literal directly.
-
Jérome Perrin authored
this works with astroid 3.2.0 and pylint 3.2.0
-
Jérome Perrin authored
-
Jérome Perrin authored
on python2, we use have a [python patch][patch] to globally make asyncore use poll, at that time we were using medusa and it was not exposing an option to use something else than select. [patch]: https://lab.nexedi.com/nexedi/slapos/-/blob/180f1553fa7774f05ae8e739dfef43fa2ae56c0a/component/python-2.7/asyncore_poll_insteadof_select.patch
-
Jérome Perrin authored
also add the missing tests
-
Jérome Perrin authored
-
Jérome Perrin authored
Because the librairies used here were never ported to python3. Notable changes: - ERP5Site_createGoogleUserToOAuth is dropped - internal API changed radically, so customizations made by overriding scripts are broken. - the core logic is now implemented in a connector class (still in portal_oauth for simplicity, but it would be simpler to move it to portal_web_services) No changes required in the google console, the redirect uri is still ERP5Site_receiveGoogleCallback
-
Kazuhiko Shiozaki authored
-
Jérome Perrin authored
page templates unicode resolver already takes care of coercing when needed and this is directly compatible with python2 and python3 Co-authored-by: Kazuhiko SHIOZAKI <kazuhiko@nexedi.com>
-
Jérome Perrin authored
This only works on python2
-
Kazuhiko Shiozaki authored
-
Carlos Ramos Carreño authored
The test testCMFActivity.TestCMFActivity.test_onErrorCallback was failing because some weak references were not dropped. The reason was that _DequeueMessageException was declared as global and it kept a traceback including the variables pointed by the weak references, preventing their garbage collection. This was fixed by using a class for the _DequeueMessageException instead of a singleton, and creating a new instance on every raise.
-
Jérome Perrin authored
This test assumed that activating a method with a string of length `n+x` as argument would be serialized in `x` more bytes that activating the same method with a string of length `n` as argument, which is only true for protocol 0 for multiple reasons ( short strings and long strings are serialized differently, "frames" are used with protocol 5) and db.string_literal seems to introduce a difference. Change the test to mock Message.dump to produce longer dumps instead of relying on this assumption.
-
Jérome Perrin authored
_resultForDoCleanups no longer exists on python3, getting the status of a test in teardown is very different accross python versions ( see https://stackoverflow.com/q/4414234 ) and just executing this code when the test failed only has the problem that a test method may count as two failures or errors, which is after all not a big problem.
-
Jérome Perrin authored
On recent pylint, this is flagged as unnecessary-pass Also update the link that was pointing to python2 doc
-
- 06 Jun, 2024 3 commits
-
-
Kazuhiko Shiozaki authored
-
Jérome Perrin authored
See merge request !1949
-
Jérome Perrin authored
-
- 05 Jun, 2024 6 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
to make sure test terminates in case of problems with webdav server
-
Jérome Perrin authored
When a test needs to login as manager again, the best way is to use ${manager_username} and ${manager_password} set in cookies before running tests. This is continuation of 445e8fa8 (ERP5TypeTestCase: rework default manager password generation, 2024-05-27)
-
Jérome Perrin authored
form_dialog was different from form_render (that is used in form_view and form_list) regarding the <legend> element for form groups: - the element was unconditionally present, unlike form_render where it is only displayed if non empty - the text was not translated
-
Titouan Soulard authored
-
- 04 Jun, 2024 6 commits
-
-
Georgios Dagkakis authored
See merge request nexedi/erp5!1950
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Georgios Dagkakis authored
-
Georgios Dagkakis authored
as it is done in other places of this file
-
Titouan Soulard authored
When pasting an image in CKEditor, the image was displayed twice. This behaviour is due to the new paste-as-base64 feature implemented in CKE, which conflict with existing plugins implementing the same feature. To solve it, add `clipboard_handleImages` option to the CKE configuration object, which disables its own image-pasting feature. See https://github.com/ckeditor/ckeditor4/issues/4874 for the corresponding issue on CKEditor’s repository. /cc @jerome @romain @tomo /reviewed-by @jerome /reviewed-on nexedi/erp5!1951
-
- 03 Jun, 2024 6 commits
-
-
Kazuhiko Shiozaki authored
-
Georgios Dagkakis authored
Otherwise, we may get error if we have special characters
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
fix convertToERP5Workflow() for the case where permission_roles is not yet configured.
-
Kazuhiko Shiozaki authored
if acquire_permission is not yet set in a Workflow State, we should consider it as 'acquire all permissions', like DCWorkflow implementation.
-
Kazuhiko Shiozaki authored
If state_permission_role_list_dict is not yet set in a Workflow State, the UI displays permission/role table with all unchecked. Once we save it in Permissions tab without checking anything, state_permission_role_list_dict will become like {'Access contents information': (), 'Add portal content': (), 'Modify portal content': (), 'View': ()} This commit will make the behaviour same for these 'before save' and 'after save' cases as the UI displays exactly same.
-
- 31 May, 2024 4 commits
-
-
Jérome Perrin authored
See merge request nexedi/erp5!1941
-
Jérome Perrin authored
In Check Source Code report on business template and CodingStyle tests, the lines were off by 1 and column off by 2 for python scripts.
-
Jérome Perrin authored
The default manager user (ERP5TypeTestCase) now have a random password generated at the beginning of test. The password is stored as a class attribute of the test case instance. Many tests have been updated to not generate manager user and use the existing one instead. When tests need to create users (for example users in the root acl_users), we try to give them a random password and to delete the users afterward. For functional tests, the approach is that ERP5TypeFunctionalTestCase sets cookies with manager username and password before running zelenium tests, so that in case tests want to log in again as manager, they can read the username and password from cookies. Another significant changes is that we no longer have the same user in ERP5/acl_users and /acl_users, some tests were logging in as the root user in ways that never seemed intentional. This also revealed (through test_manager_actions_on_portal from testERP5Core) that some tests were running with a user without all the expected permissions and the "Manager Components" actions was not visible for the default manager user. Fixing this also revealed that two actions ("Manage Components" and "Manage Callables") had the same priority, so the later was modified to use a different priority.
-
Jérome Perrin authored
pycrypto is unmaintained and the python3 version no longer work with buildout 3 (it uses a tricky way to run 2to3 in setup.py that no longer happens with pip based buildout3) Also make the rest of this file python3 compatible.
-