Esempio n. 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'>"""
     )
Esempio n. 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'>""")
Esempio n. 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">""")
Esempio n. 4
0
 def test_body_w_attrs(self):
     text = """<body dir="ltr">"""
     self.assertEqual(utils.add_bodyclass(text), """<body dir="ltr" class="gray-style">""")