An error occurred fetching the project authors.
  1. 21 Aug, 2023 2 commits
  2. 16 Jun, 2023 1 commit
  3. 19 Dec, 2022 1 commit
    • Jérome Perrin's avatar
      *: rewrite with lib2to3.fixes.fix_asserts and ad-hoc assertin · 2e366054
      Jérome Perrin authored
      The add-hoc assertin filter:
      
      --
      
      from typing import List
      
      import lib2to3
      
      from lib2to3.fixer_base import BaseFix
      from lib2to3.fixer_util import Comma, Name
      
      class FixAssertIn(BaseFix):
      
        PATTERN = """
            power< any+ trailer< '.' meth=("assertTrue" | "assertFalse")>
            trailer< '('
              comparison< (needle=any ( comp_op<'not' 'in'> | 'in' ) haystack=any) >
            ')' > >
        """
      
        def transform(self, node: lib2to3.pytree.Node,
                      results: List[lib2to3.pytree.Base]):
      
          needle = results['needle']
          haystack = results['haystack']
          meth = results["meth"][0]
      
          method_map = {True: 'assertIn', False: 'assertNotIn'}
          method_in = meth.value == 'assertTrue'
          if 'not' in str(needle.parent.children[1]):
            method_in = not method_in
          meth.replace(Name(method_map[method_in], prefix=meth.prefix))
      
          needle.parent.children = [needle, Comma(), haystack]
      2e366054
  4. 25 Mar, 2021 1 commit
  5. 14 Jan, 2021 1 commit
    • Jérome Perrin's avatar
      xhtml_style/authentication_policy: merge "logged_in" implementation · b9097101
      Jérome Perrin authored
      This simplify code and also bring the functionnality of c484f8aa
      (erp5_xhtml_style Base_cancel and logged_in: do not allow redirection outside
      ERP5 site., 2016-02-12) for the cases where authentication_policy is
      installed.
      
      This also fixes a problem with translations of "Your password will expire at
       {date}", which was using different messages for every possible date.
      
      Tests needed to be updated because we now redirect with properly URL encoded
      parameters.
      b9097101
  6. 06 Jan, 2021 1 commit
    • Jérome Perrin's avatar
      authentication_policy: fix UnicodeDecodeError with invalid password messages · 28ef4724
      Jérome Perrin authored
      When new password does not match policy, in reset password and change
      password dialogs, we used u' '.join([str(message) ...]) to join all
      translated messages in a string, but this construct will decode the
      str(message) to unicode using ascii, so it will fail when these messages
      contain some multi bytes characters.
      
      Extend test coverage to check that these dialogs uses translations and use
      non ascii messages in the tests, to make sure we don't have regressions
      with this issue.
      28ef4724
  7. 05 Sep, 2020 1 commit
  8. 20 Jul, 2020 1 commit
  9. 15 Jul, 2020 1 commit
  10. 13 Apr, 2020 1 commit
    • Jérome Perrin's avatar
      testAuthenticationPolicy: install erp5_crm · 468da0e3
      Jérome Perrin authored
      This is a dependency of erp5_credential, it should be installed in the
      test.
      
      This fixes a test failure,
      portal_notification.sendNotification(store_as_event=True) is now an
      error when erp5_crm is not installed.
      468da0e3
  11. 06 Apr, 2020 2 commits
  12. 20 Jan, 2020 1 commit
  13. 15 Nov, 2019 1 commit
    • Jérome Perrin's avatar
      preferences: use an interaction workflow to clear cache · 3e558ff9
      Jérome Perrin authored
      When we use preference.edit(preferred_something=something_else) the
      cache was cleared, because there is an interaction on _edit, but when we
      do preference.setPreferredSomething(something_else) cache was not
      cleared.
      
      This still have a problem cache is cleared too much but at least it
      eliminates this incorrect behavior.
      
      Update tests at the same time:
       - testEditorField,testAuthenticationPolicy: no need to clear cache,
         it's now done automatically.
       - testUpgrader: the workflow chain of preference changed. This test is
         asserting the actual workflow chain, so we have to update the test
         everytime workflow chain is modified.
      3e558ff9
  14. 16 Sep, 2019 1 commit
  15. 19 Jan, 2017 4 commits
  16. 10 Jan, 2017 2 commits
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      test: fix some test isolation problems in testAuthenticationPolicy · 0868b311
      Jérome Perrin authored
      Tests should not depend on the state left by the previous test run.
      
      This was achieved by:
      
      * use a different preference in each method to reset the state of preferences configuration.
      * clear cache after setting preferences, so that the new preference setting is used
      * change password after setting the max preferred password lifetime duration, otherwise password event are not created and password is not detected as expired.
      * rename test methods not to include number, we should not force test ordering, since we want tests to be independant.
      * Also add one case of password actually expired
      0868b311
  17. 23 Dec, 2016 2 commits
  18. 10 Mar, 2015 1 commit
  19. 16 Oct, 2014 1 commit
  20. 04 Sep, 2014 1 commit
  21. 12 Sep, 2013 1 commit
  22. 15 May, 2012 1 commit
  23. 11 May, 2012 1 commit
  24. 03 May, 2012 1 commit
  25. 16 Mar, 2012 1 commit
  26. 09 Sep, 2011 1 commit
  27. 15 Aug, 2011 1 commit
  28. 28 Jul, 2011 1 commit
  29. 27 Jul, 2011 1 commit
  30. 25 Jul, 2011 1 commit
  31. 21 Jul, 2011 1 commit
  32. 18 Jul, 2011 2 commits