1. 08 Feb, 2020 1 commit
  2. 24 Jul, 2019 1 commit
    • Denis Laxalde's avatar
      [test] Replace symlinks in legacy_cubes by real copies · 7ed069414b27
      Denis Laxalde authored
      This solves a "python setup.py build" issue on my machine.
      Copying these files should not be a big deal because they
      have been dropped in the "default" branch and we would not
      touch them in 3.26 branch.
      
      --HG--
      branch : 3.26
      7ed069414b27
  3. 22 May, 2019 2 commits
  4. 21 May, 2019 2 commits
  5. 25 Jul, 2019 1 commit
    • Laurent Peuch's avatar
      [cubicweb-ctl/fix] correctly get exception traceback_ for pdb.post_mortem · 17d1b1f4eddd
      Laurent Peuch authored
      In python 3 the behavior of sys.exc_info had a very subtle change:
      
      - in python 2 you can call if whenever you want after a try/except statement
        and you'll get information about this last raise
      - ipython 3, once you get out of try/except, sys.exc_info is cleaned and you'll
        get (None, None, None)
      
      Hardened the test to avoid this error from happening again.
      17d1b1f4eddd
  6. 24 Jul, 2019 1 commit
  7. 22 Jul, 2019 4 commits
  8. 21 May, 2019 1 commit
  9. 22 Jul, 2019 1 commit
  10. 21 May, 2019 1 commit
    • Laurent Peuch's avatar
      [cubicweb-ctl] move to accepting only once instance name per command · 84a8a8915512
      Laurent Peuch authored
      The rationals behind this decision are:
      
      - while in the past managing all instances sytem wide made a lot of sens,
        pratices have evolved today and we've moved to managing one instance by one
      - this makes things easier to debug since commands since using them on several
        instances were making this harder (errors hidden in the middle)
      - also solve the problem of the return code to have, before it was always 0
        which prevented to do things like:
            ipython --pdb $(which cubicweb-ctl) $command $instance
        or shell scripts that used it
      - this simplify the code and is always good to take
      84a8a8915512
  11. 19 Jun, 2019 1 commit
  12. 28 May, 2019 1 commit
  13. 28 Mar, 2019 1 commit
    • Philippe Pepiot's avatar
      [server/test] make test filename uniques · 3648a2c293f6
      Philippe Pepiot authored
      To avoid these pytest error when collecting the whole test suite:
      
      import file mismatch:
      imported module 'unittest_utils' has this __file__ attribute:
        cubicweb/cubicweb/server/test/unittest_utils.py
      which is not the same as the test file we want to collect:
        cubicweb/cubicweb/test/unittest_utils.py
      
      
      Move cubicweb/server/test/unittest_security.py to cubicweb/server/test/unittest_security.py
      and cubicweb/test/unittest_utils.py to cubicweb/test/unittest_server_utils.py
      3648a2c293f6
  14. 10 May, 2019 1 commit
    • Philippe Pepiot's avatar
      Move CWSchemaTC to RQLExpressionTC · 7882ad333954
      Philippe Pepiot authored
      The test actually doesn't require a cubicweb schema, except for testing
      EmailAdress which is out of scope of the test (testing RQLExpression.transform_has_permission()).
      
      Just move the test in existing RQLExpressionTC inheriting from TestCase and
      rename the tests to be more explicit.
      7882ad333954
  15. 12 Apr, 2019 2 commits
  16. 26 Mar, 2019 1 commit
  17. 05 Apr, 2019 1 commit
    • Denis Laxalde's avatar
      Drop python2 support · 26744ad37953
      Denis Laxalde authored
      This mostly consists in removing the dependency on "six" and updating
      the code to use only Python3 idioms.
      
      Notice that we previously used TemporaryDirectory from
      cubicweb.devtools.testlib for compatibility with Python2. We now
      directly import it from tempfile.
      26744ad37953
  18. 28 Mar, 2019 1 commit
  19. 22 Mar, 2019 1 commit
  20. 16 May, 2019 1 commit
    • Denis Laxalde's avatar
      Make crypto module python3-compatible · 7abe23cbfda1
      Denis Laxalde authored
      * Remove usage of unicode() and decode the base64-encoded string in
        encrypt();
      * Encode the string received in decrypt() as (I supposed) it should come
        from the result of encrypt().
      
      Add tests for this module along the way.
      
      --HG--
      branch : 3.26
      7abe23cbfda1
  21. 15 Mar, 2019 3 commits
    • Philippe Pepiot's avatar
      [test] drop dependency on third party cubes · 12e8b65146d9
      Philippe Pepiot authored
      Drop dependency on cubicweb-file, cubicweb-localperms, cubicweb-tag and
      cubicweb-comment for cubicweb.test and cubicweb.sobjects.test
      
      Move cubicweb/test/data/libpython/cubicweb_* to cubicweb/test/data, so it's
      included in PYTHONPATH.
      Add missing parts of schema, entities, views, hooks that make tests pass.
      12e8b65146d9
    • Philippe Pepiot's avatar
      [test] drop CubicWebConfigurationWithLegacyCubesTC · 34c4157b1071
      Philippe Pepiot authored
      This is used to test legacy cube import which is planned for removal
      in cubicweb 3.27, so drop the code.
      34c4157b1071
    • Philippe Pepiot's avatar
      [test] drop unittest_cubes.py · ec089debcd45
      Philippe Pepiot authored
      This is used to test legacy cube import which is planned for removal in
      cubicweb 3.27, so drop the code.
      ec089debcd45
  22. 14 Mar, 2019 3 commits
    • Denis Laxalde's avatar
      Drop most of deprecated code · a8c1ea390400
      Denis Laxalde authored
      As in previous changesets, most code has been deprecated since a very
      long time. This changeset concerns "core" cubicweb modules
      (e.g. "server", "appobjects") for which it's not easy to handle change
      atomically.
      
      In cubicweb/server/querier.py, we adjust empty_rset() function as a
      result of "rqlst" argument of ResultSet being dropped. (There was no use
      of the keyword argument anyways.)
      a8c1ea390400
    • Denis Laxalde's avatar
      [test] Remove upper bound for cubicweb-localperms · ef2168f389f6
      Denis Laxalde authored
      Version 0.4.0 does not use a deprecated API that we are planning to drop
      in forthcoming changesets.
      
      This requires changing expected values in unittest_cwconfig.py where we
      scan install cubes.
      
      *   In CubicWebConfigurationTC.test_available_cubes(), localperms
          disappears from the list of expected cubes because this test method
          will look for new style cubes in located in cubicweb/test/data/libpython/
          (we patch pkg_resources.iter_entry_points()) as well as old style
          cubes installed in $PREFIX/share/cubicweb/cubes; since the new
          cubicweb-localperms version is new-style, it won't be catched by this
          method.
      
      *   In CubicWebConfigurationWithLegacyCubesTC.test_available_cubes(),
          localperms is still listed, but now with the package name, because
          this method will simply look at installed cubes whether old or new
          style.
      ef2168f389f6
    • Denis Laxalde's avatar
      [test] Make the expected value explicit in... · 2699e0f3f54a
      Denis Laxalde authored
      [test] Make the expected value explicit in CubicWebConfigurationWithLegacyCubesTC.test_available_cubes()
      
      This will help with the next changeset, and avoiding computation in
      tests is a good thing in general.
      2699e0f3f54a
  23. 13 Mar, 2019 1 commit
  24. 12 Mar, 2019 1 commit
  25. 14 Mar, 2019 1 commit
  26. 29 Oct, 2018 2 commits
    • Philippe Pepiot's avatar
      Fix flake8 issues since release 3.6.0 · 2fcb53ee5178
      Philippe Pepiot authored
      Flake8 had a new release which raise new issues, namely:
      
      W504: line break after binary operator
      F841: local variable 'ex' is assigned to but never used
      W605: invalid escape sequence
      F821: undefined name 'buffer' (noqa seems the only way to avoid this false positive)
      
      Also pin flake8>=3.6 in our tests and make explicit that we use python3 to run
      flake8 tests.
      
      --HG--
      branch : 3.26
      2fcb53ee5178
    • Philippe Pepiot's avatar
      Fix flake8 issues since release 3.6.0 · c703dc95c82e
      Philippe Pepiot authored
      Flake8 had a new release which raise new issues, namely:
      
      W504: line break after binary operator
      F841: local variable 'ex' is assigned to but never used
      W605: invalid escape sequence
      F821: undefined name 'buffer' (noqa seems the only way to avoid this false positive)
      
      Also pin flake8>=3.6 in our tests and make explicit that we use python3 to run
      flake8 tests.
      c703dc95c82e
  27. 25 Apr, 2018 1 commit
    • Laurent Wouters's avatar
      [utils] Fixes compatiblity of QueryCache with expected dict interface · cbbcfa69a0e7
      Laurent Wouters authored
      QueryCache is expected to mimick the interface of the dict built-in. The current
      __iter__ implementation breaks this expectation by iterating over key, value
      pairs instead of only the keys.
      
      This changeset fixes this issue by changing the __iter__ implementation to
      iterate over the keys in the cache and providing an implementation of the items
      method with a contract identical to the dict build-in (return a copy of the key-
      value pairs within the dictionary as a list).
      cbbcfa69a0e7
  28. 24 Apr, 2018 2 commits