Example #1
0
 def test_whitespace_beginning(self):
     result = html.check('tests/samples/html/whitespace_beginning.html')
     self.assertEqual(PolyglotLevel(), result)
Example #2
0
 def test_base_file(self):
     result = html.check('tests/samples/html/base.html')
     self.assertEqual(PolyglotLevel(), result)
Example #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)
Example #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)
Example #5
0
 def test_lone_body(self):
     result = html.check('tests/samples/html/lone_body.html')
     self.assertEqual(PolyglotLevel(), result)
Example #6
0
 def test_only_js(self):
     result = html.check('tests/samples/html/only_js.html')
     self.assertEqual(PolyglotLevel(), result)
Example #7
0
 def test_not_html(self):
     self.assertIsNone(html.check('tests/samples/zip/regular.zip'))