1. 19 Oct, 2016 4 commits
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      test: fix some test isolation problems in testAuthenticationPolicy · 5510c295
      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
      5510c295
    • Jérome Perrin's avatar
      authentication_event: fix password expiration · 0f2b7954
      Jérome Perrin authored
      Before this change, password event were only recorded when
      preferred_number_of_last_password_to_check was set.
      
      We also need to record password events to check for password lifetime,
      so also record password events when preferred_max_lifetime_duration is
      is set (also when set to 0h, but this only makes sense in tests).
      
      testAuthenticationPolicy was not showing this problem, because tests were not properly
      isolated and test_02_PasswordHistory was enabling
      preferred_number_of_last_password_to_check for all other tests.
      0f2b7954
    • Arnaud Fontaine's avatar
      ListBox: Navigation methods should not be created when rendering ListBox (#20161014-741678). · 6fd21826
      Arnaud Fontaine authored
      These methods were generated when rendering the ListBox and with the id
      of the ListBox in their name. However, a customer reported the following
      problem on Accounting Periods ListBox:
      
        1. Display Accounting Period ListBox on ZEO-1.
             => The ListBox will be rendered and 'listbox_period_list_*' methods will be generated on ZEO-1.
        2.  Click on 'Next Page' button and the user is redirect to ZEO-2 where the ListBox has never been generated.
             => The method does not exist yet and thus a 404 error is raised.
      
      Instead of having one method per ListBox ID, only one is now created (eg
      listbox_setPage() for SelectionTool.setPage()) at Zope startup and the
      ListBox ID previously defined in the method name is now defined in the
      value attributes of the buttons.
      6fd21826
  2. 18 Oct, 2016 1 commit
  3. 16 Oct, 2016 2 commits
  4. 14 Oct, 2016 6 commits
  5. 11 Oct, 2016 1 commit
  6. 07 Oct, 2016 2 commits
  7. 06 Oct, 2016 2 commits
    • Cédric Le Ninivin's avatar
      erp5_officejs: Fix test · 022bf140
      Cédric Le Ninivin authored
      by adding  timeout in order to prevent an error from changing page before
      finishing loading the iframed setting gadget
      022bf140
    • Jérome Perrin's avatar
      Fix timezone problems with formprintout · 544c68e0
      Jérome Perrin authored
      When pusing to for_testrunner_1 branch, we often have this failure on testFormPrintoutAsODT:
      
      ```
      ======================================================================
      FAIL: test_field_replacement_with_variable (testFormPrintoutAsODT.TestFormPrintoutAsODT)
      test variables replacement in ODT documents.
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/srv/slapgrid/slappart9/srv/testnode/zl/soft/4a13de8a0fdf926ddebab0387de0dc5e/parts/erp5/Products/ERP5OOo/tests/testFormPrintoutAsODT.py", line 1252, in test_field_replacement_with_variable
          self.assertEqual(node.text, value.strftime('%d/%m/%Y %H:%M:%S'))
      AssertionError: '06/12/2010 11:33:15' != '06/12/2010 11:24:15'
      ```
      
      After some investigation, turned out that:
      * tests where always failing when running by `COMP-2544-3Nodes-ERP5PROJECT2` testnode
      * This machine uses `SystemV/CST6CDT` as timezone
      * the test fails in the same way when running locally with `TZ=SystemV/CST6CDT`
      
      I belive this fixes, I tried running under `SystemV/CST6CDT`, `UTC` and `Europe/Paris`  TZ and it passes for all cases. 
      
      /reviewed-on nexedi/erp5!174
      544c68e0
  8. 05 Oct, 2016 19 commits
  9. 04 Oct, 2016 3 commits