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