Example #1
0
 def test_body_w_class_w_other_attrs(self):
     text = """<body class='homepage template-document_view' dir='ltr'>"""
     self.assertEqual(
         utils.add_bodyclass(text), """<body class='gray-style homepage template-document_view' dir='ltr'>"""
     )
Example #2
0
 def test_body_w_class_no_other_attrs(self):
     text = """<body class='homepage'>"""
     self.assertEqual(utils.add_bodyclass(text), """<body class='gray-style homepage'>""")
Example #3
0
 def test_body_w_class_many_no_other_attrs(self):
     text = """<body class="homepage template-document_view">"""
     self.assertEqual(utils.add_bodyclass(text), """<body class="gray-style homepage template-document_view">""")
Example #4
0
 def test_body_w_attrs(self):
     text = """<body dir="ltr">"""
     self.assertEqual(utils.add_bodyclass(text), """<body dir="ltr" class="gray-style">""")