Skip to content
Snippets Groups Projects
Commit 3e9a1dd7 authored by Romain Derie's avatar Romain Derie
Browse files

[FIX] website: prevent race condition on visitor merge test

Since [1], a race condition would be faced as the dict order is not
guaranteed, sometimes failing because:
```
AssertionError: Lists differ: ['/demo', '/admin'] != ['/admin', '/demo']
```

[1]: https://github.com/odoo/odoo/commit/a87b4142dd4a2c05e3e1885b2c54f5e0d3c7ac47



runbot-15727

closes odoo/odoo#111318

Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
parent f16dee5b
No related branches found
No related tags found
No related merge requests found
......@@ -437,7 +437,7 @@ class WebsiteVisitorTests(MockVisitor, HttpCaseWithUserDemo):
self.assertFalse(Visitor.search_count([('partner_id', '=', self.partner_demo.id)]),
"The demo visitor should've been merged (and deleted) with the admin one.")
# Track check
self.assertEqual(visitor_admin.website_track_ids.mapped('url'), ['/admin', '/demo'])
self.assertEqual(visitor_admin.website_track_ids.sorted('url').mapped('url'), ['/admin', '/demo'])
def test_merge_partner_with_visitor_single(self):
""" The partner merge feature of Odoo is auto discovering relations to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment