Exemplo n.º 1
0
 def test_whitespace_beginning(self):
     result = html.check('tests/samples/html/whitespace_beginning.html')
     self.assertEqual(PolyglotLevel(), result)
Exemplo n.º 2
0
 def test_base_file(self):
     result = html.check('tests/samples/html/base.html')
     self.assertEqual(PolyglotLevel(), result)
Exemplo n.º 3
0
 def test_garbage_end_4(self):
     result = html.check('tests/samples/html/garbage_end_4.html')
     self.assertEqual(PolyglotLevel(suspicious_chunks=[(0x6, 0x12)]),
                      result)
Exemplo n.º 4
0
 def test_garbage_beginning_2(self):
     result = html.check('tests/samples/html/garbage_beginning_2.html')
     self.assertEqual(PolyglotLevel(suspicious_chunks=[(0, 0x14)]),
                      result)
Exemplo n.º 5
0
 def test_lone_body(self):
     result = html.check('tests/samples/html/lone_body.html')
     self.assertEqual(PolyglotLevel(), result)
Exemplo n.º 6
0
 def test_only_js(self):
     result = html.check('tests/samples/html/only_js.html')
     self.assertEqual(PolyglotLevel(), result)
Exemplo n.º 7
0
 def test_not_html(self):
     self.assertIsNone(html.check('tests/samples/zip/regular.zip'))