- 12 Sep, 2018 1 commit
-
-
Jérome Perrin authored
Tests asserts that size have all languages available, so let's be compatible and just set the default language to the current selected one at site creation.
-
- 11 Sep, 2018 6 commits
-
-
Nicolas Wavrant authored
-
Jérome Perrin authored
-
Jérome Perrin authored
This was not really backward compatible when running with old slapos, because default value was not string in this case.
-
Nicolas Wavrant authored
This step was in reality only removing the "Access Content Information" permission for Anonymous on web_site_module, which was not coherent with erp5_web, and had for consequence to make developers change it by hand when wanting to use web_site_module
-
Jérome Perrin authored
Extend test runners to use partition IP and run functional tests behind an https frontend. See nexedi/slapos!374 for the slapos part and more detailed explanations. /reviewed-on nexedi/erp5!729
-
Jérome Perrin authored
/reviewed-on nexedi/erp5!742
-
- 07 Sep, 2018 6 commits
-
-
Romain Courteaud authored
-
Sven Franck authored
/reviewed-on nexedi/erp5!737
-
Sebastien Robin authored
-
Jérome Perrin authored
I made a mistake rebasing & applying the patch to master, so the test added in nexedi/erp5!726 (comment 65067) did not reach master. This reapplies this part. Thanks Seb for noticing !
-
Jérome Perrin authored
On the traditional editor (from portal_component), selected text was not highlighted
-
Jérome Perrin authored
This is something the webmaster will define. Also, initialize available languages like this will select a random default language, which the webmaster might not understand.
-
- 05 Sep, 2018 4 commits
-
-
Nicolas Wavrant authored
-
Nicolas Wavrant authored
-
Nicolas Wavrant authored
-
Georgios Dagkakis authored
So that a declaration like: context.getUrlFor({command: 'display_action', options: {jio_key: "document", page: "action_reference"}}) can return the URL to redirect to the given action or the document
-
- 04 Sep, 2018 7 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
As it is backward compatible, this option can be passed as environment variable. Also re-order all argument output to make it clear which comes from SlapOS generated wrapper and which are passed by test node.
-
Jérome Perrin authored
We now access zserver behind the backend apache on https:// and this apache's certificate is not trusted
-
Jérome Perrin authored
-
Jérome Perrin authored
Otherwise running in debug mode on headless machines just display cryptic error message.
-
Jérome Perrin authored
- 03 Sep, 2018 2 commits
-
-
Vincent Pelletier authored
-
Vincent Pelletier authored
-
- 01 Sep, 2018 5 commits
-
-
Vincent Pelletier authored
Auto-generate cache_id, removing the risk of duplicating one. Inline getInstanceID as it is its only caller left. Avoid wrapping if getTransactionalVariable cannot be imported. Avoid intermediate variables, at the cost of dupicating logic but accelerating run-time. Use functools.wraps . Access _cache_sequence_number directly - these pieces of code are friends anyway, we already set a volatile property on Catalog instance. Saves one getattr and one call.
-
Vincent Pelletier authored
No backslash at EOL. Avoid splitting messages, to ease code lookup. LOG's "error" argument accepts a boolean, which removes the need to touch sys.exc_info. Use modern exception raising syntax.
-
Vincent Pelletier authored
-
Vincent Pelletier authored
-
Vincent Pelletier authored
_getSelectDict was also calling itself on sub-sql_expressions, but this was useless: they would already have called it, and discarded one of its returned values. Instead, preserve both returned values in __init__ and access these attributes directly when iterating over sub-sql_expressions. Also, fold canMergeSelectDict back into its only 2 call places, saving one getattr and one call. Also, get rid of a few properties which were only used in _getSelectDict. Also, get rid of two iterable copies: sql_expression_list when it is already a list (no need to cast it again to a list, we just built one with the list comprehension), and select_dict being cast into a list when entering _getSelectDict, despite not being used (besides in extra _getSelectDict calls, which are now entirely avoided).
-
- 31 Aug, 2018 3 commits
-
-
Sebastien Robin authored
-
Jérome Perrin authored
Because some tests or softwares can chmod'ed some files to make them readonly, testnode should try to chmod the files to deletable state if deleting them fail in the first place.
-
Jérome Perrin authored
Telephone.asUrl (which is used in erp5_short_message) properly supported detailed coordinates, but had no support for coordinate text. In that case, we don't try to be to clever and just use the coordinate (almost) as is, just using the tel: prefix and removing spaces which are not legal.
-
- 29 Aug, 2018 5 commits
-
-
Vincent Pelletier authored
-
Vincent Pelletier authored
A pprofile run shows DateTime_or_None costing 3ms per value (including all callees). While this may seem low, it is common to receive hundreds of such values in single query results (ex: web mode document & webpage lookups), so the total time spent parting dates per query can become significantly larger than the time to execute the query itself. In the case of this measure setup, 504 dates were processed for a total of 1.5 seconds. DateTime is slow to parse strings because it cannot rely on a pre-known format. With MySQL/MariaDB, the format is know for those column types, so implement specific parsing to get better performance. On the same setup, pprofile run shows a parsing time of 123µs per value in DATETIME_to_DateTime_or_None, or 65ms total. DATE_to_DateTime_or_None should not deviate significantly from this.
-
Vincent Pelletier authored
For some reason, unit tests all broke while testing this revision. The relation between both is not clear to me (this code has worked for me). In doubt, I revert it for now. This reverts commit 0057272c.
-
Vincent Pelletier authored
getRelativeUrl and restrictedTraverse are expensive operations. Do not involve them pointlessly. Also, boolean evaluation of lists is a thing.
-
Vincent Pelletier authored
A pprofile run shows DateTime_or_None costing 3ms per value (including all callees). While this may seem low, it is common to receive hundreds of such values in single query results (ex: web mode document & webpage lookups), so the total time spent parting dates per query can become significantly larger than the time to execute the query itself. In the case of this measure setup, 504 dates were processed for a total of 1.5 seconds. DateTime is slow to parse strings because it cannot rely on a pre-known format. With MySQL/MariaDB, the format is know for those column types, so implement specific parsing to get better performance. On the same setup, pprofile run shows a parsing time of 72µs per value in DATETIME_to_DateTime_or_None, or 39ms total. DATE_to_DateTime_or_None should not deviate significantly from this.
-
- 28 Aug, 2018 1 commit
-
-
Jérome Perrin authored
Categories are member of themselves. When a category is renamed, the membership to self was already preserved thanks to 7f2e8eb2 , but this was not the case when a category was cut and pasted. There are two different cases: * When just created, a category is member of itself because this is the [default behavior](https://lab.nexedi.com/nexedi/erp5/blob/b705495de0f04645b7b3ad3b74c46de00c923876/product/CMFCategory/CategoryTool.py#L1193-1196) for categories not having categories set. In this case, it's dynamic. * When category has some categories set ( in `self.categories` ) - this happens for example after being renamed - then behavior is different and `self.categories` has to be updated. 7f2e8eb2 was handling properly the later case after a clone, but not in a cut and paste ( move ) scenario, because in this case "after clone" hook is not called. The first idea was to move the same hook at another level by overloading `_postCopy` but after some discussion and thinking, it seemed more logical to make sure `CategoryTool.setCategoryList` does not save categories membership to self, which is consistent in the way `CategoryTool.getCategoryList` adds the membership to self dynamically. This MR brings a few more tests, so that we can claim [#1900](https://nexedi.erp5.net/bug_module/1900) and [#704](https://nexedi.erp5.net/bug_module/704) are tested enough and close these old bugs. /reviewed-on !664
-