Exemplo n.º 1
0
 def test_regular_file(self):
     self.assertEqual(PolyglotLevel(),
                      ogg.check('tests/samples/ogg/regular.ogg'))
Exemplo n.º 2
0
 def test_garbage_at_end(self):
     result = ogg.check('tests/samples/ogg/garbage_at_end.ogg')
     self.assertEqual(PolyglotLevel(suspicious_chunks=[(0x83AA, 0xE)]),
                      result)
Exemplo n.º 3
0
 def test_garbage_at_beginning(self):
     result = ogg.check('tests/samples/ogg/garbage_at_beginning.ogg')
     self.assertEqual(PolyglotLevel(suspicious_chunks=[(0, 0x11)]), result)
Exemplo n.º 4
0
 def test_garbage_in_middle(self):
     result = ogg.check('tests/samples/ogg/garbage_in_middle.ogg')
     self.assertEqual(PolyglotLevel(suspicious_chunks=[(0xA39, 0x26)]),
                      result)
Exemplo n.º 5
0
 def test_not_ogg(self):
     self.assertIsNone(ogg.check('tests/samples/zip/regular.zip'))