MCPcopy
hub / github.com/django/django / test_class_attribute

Method test_class_attribute

tests/test_utils/tests.py:801–813  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

799 )
800
801 def test_class_attribute(self):
802 pairs = [
803 ('<p class="foo bar"></p>', '<p class="bar foo"></p>'),
804 ('<p class=" foo bar "></p>', '<p class="bar foo"></p>'),
805 ('<p class=" foo bar "></p>', '<p class="bar foo"></p>'),
806 ('<p class="foo\tbar"></p>', '<p class="bar foo"></p>'),
807 ('<p class="\tfoo\tbar\t"></p>', '<p class="bar foo"></p>'),
808 ('<p class="\t\t\tfoo\t\t\tbar\t\t\t"></p>', '<p class="bar foo"></p>'),
809 ('<p class="\t \nfoo \t\nbar\n\t "></p>', '<p class="bar foo"></p>'),
810 ]
811 for html1, html2 in pairs:
812 with self.subTest(html1):
813 self.assertHTMLEqual(html1, html2)
814
815 def test_boolean_attribute(self):
816 html1 = "<input checked>"

Callers

nothing calls this directly

Calls 1

assertHTMLEqualMethod · 0.80

Tested by

no test coverage detected