Skip to content

Avoid random test_multiple_emails failure

Pelayo García requested to merge fix/sort-email-ids-recordset into master

Apparently, the order of a recordset during its creation is not fixed.

 "email_ids": [(6, 0, ([child_email.id, second_child_email.id, third_child_email.id]))]

Giving then then the possibility of a contract.email_ids with a different partner order from the stated above. This can break from time to time the pipeline because of this error with test_multiple_emails:

AssertionError: 'hello@example.com,second@example.com' != 'second@example.com,third@example.com'
 - hello@example.com,second@example.com
 + second@example.com,third@example.com
  • Change the test asserts to fix this issue
  • Add a little refactor of small issues
Edited by Pelayo García

Merge request reports