Skip to content

Fix tests

Administrator requested to merge fix-tests into master

Commit 3: Update README with python version issue

Commit 2: Fix tests in python3.8 and python2.7

Add future.utils module Update the way tox loads dependencies

  • Problem 1: string.encode(), encodes a string in py27 but also transforms in as binary in py38, so string comparisions fail in py38 tests.

Solution: Encode them and transform them later to native string with bytes_to_native_str method (works with both python2 and python3)

  • Problem 2:
TypeError: '<' not supported between instances of 'InternetProcessTicket' and 'InternetProcessTicket'

Solution: avoid sorting objects. Also, in tests don't compare instances that are expected to "be" equal. Compare instead their content

  • Problem 3:
SyntaxError: Non-ASCII character '\xc3' in file /home/gfunosas/Escriptori/dev/OTRS/otrs-somconnexio/tests/services/test_update_process_ticket_with_MM_error.py on line 19, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Solution: Avoid non utf8 charactes in test_update_process_ticket_with_MM_error.py Also, add empty line at the end of file.

Commit 1: Rename 'test_mm_error_.py' file to 'test_mm_error_article.py'

Edited by Administrator

Merge request reports

Loading