Skip to content

Conversation

living180
Copy link
Contributor

@living180 living180 commented Mar 21, 2022

The BaseTestCase.assertValidHTML() helper method was not parsing the passed in content argument, but instead self.panel.content. Fix this issue, and also remove the msg argument which was never supplied by any callers. Finally, fix a test case failure exposed by changing the method to parse the supplied content.

Prior to this commit, the BaseTestCase.assertValidHTML() method was not
parsing the content from the provided argument, but was instead parsing
self.panel.content.  For most usages, the passed in content was the same
as self.panel.content, but for the
TemplatesPanelTestCase.test_template_repr() test case it was not,
resulting in an invalid test.
Allows removal of a call to the internal TestCase._formatMessage()
method.
Since the passed in HTML does not necessarily represent the panel
content, change the message to no longer reference "Content".
@matthiask matthiask merged commit a8a7267 into django-commons:main Apr 12, 2022
@matthiask
Copy link
Member

Thank you!

@living180 living180 deleted the assert_valid_html branch May 29, 2022 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants