Skip to content

[19.0][FIX] crm_lead_to_task, crm_project_create: fix tests#746

Draft
WesleyOliveira98 wants to merge 2 commits into
OCA:19.0from
Escodoo:19.0-crm_lead_to_task-fix-tests
Draft

[19.0][FIX] crm_lead_to_task, crm_project_create: fix tests#746
WesleyOliveira98 wants to merge 2 commits into
OCA:19.0from
Escodoo:19.0-crm_lead_to_task-fix-tests

Conversation

@WesleyOliveira98

@WesleyOliveira98 WesleyOliveira98 commented May 21, 2026

Copy link
Copy Markdown

Fix error in tests

Traceback (most recent call last):
  File "/__w/crm/crm/crm_lead_to_task/tests/test_crm_project.py", line 33, in test_crm_project
    self.assertEqual(task.description, "<p>Description</p>")
AssertionError: Markup('<span>Description</span>') != '<p>Description</p>'
Traceback (most recent call last):
  File "/opt/odoo/odoo/tests/common.py", line 2656, in with_users
    func(self, *args, **kwargs)
  File "/__w/crm/crm/crm_project_create/tests/test_crm_create_project.py", line 63, in test_crm_create_project
    self.assertEqual(
AssertionError: Markup('<span>Test Description</span>') != Markup('<p>Test Description</p>')

@OCA-git-bot OCA-git-bot added the mod:crm_project_create Module crm_project_create label May 21, 2026
@WesleyOliveira98 WesleyOliveira98 changed the title [19.0][FIX] crm_lead_to_task: fix tests [19.0][FIX] crm_lead_to_task, crm_project_create: fix tests May 21, 2026
@WesleyOliveira98

Copy link
Copy Markdown
Author

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of asserting the exact Markup value, we can make the test more robust by checking the actual content.

This is similar to the approach used in OCA/account-financial-tools#2305, where the test was updated to verify the relevant content rather than the exact HTML/Markup representation.

Comment on lines 63 to 66
self.assertEqual(
self.lead.project_id.description,
Markup("<p>Test Description</p>"),
Markup("<span>Test Description</span>"),
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertIn(
"Test Description",
self.lead.project_id.description,
)

@WesleyOliveira98 WesleyOliveira98 marked this pull request as draft June 10, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:crm_lead_to_task Module crm_lead_to_task mod:crm_project_create Module crm_project_create series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants