Exemple #1
0
 def test_regular_file(self):
     self.assertEqual(PolyglotLevel(),
                      wav.check('tests/samples/wav/regular.wav'))
Exemple #2
0
 def test_garbage_at_beginning(self):
     result = wav.check('tests/samples/wav/garbage_at_beginning.wav')
     self.assertEqual(PolyglotLevel(suspicious_chunks=[(0, 0xF)]), result)
Exemple #3
0
 def test_garbage_at_beginning_and_end(self):
     result = wav.check(
         'tests/samples/wav/garbage_at_beginning_and_end.wav')
     self.assertEqual(
         PolyglotLevel(suspicious_chunks=[(0, 0x15), (0x56429, 0x2E8C)]),
         result)
Exemple #4
0
 def test_not_wav(self):
     self.assertIsNone(wav.check('tests/samples/zip/regular.zip'))