예제 #1
0
 def test_fuzz_in_range(self):
     for x in range(self.sf.len):
         self.sf.tries = x
         with InsertFuzzer(*self.args) as f:
             f._fuzz()
             self.assertEqual(len(f.output), self.sf.len + 1)
             self.assertEqual(chr(f.output[x + 1]), self.sf.value[x])
             if x > 0:
                 self.assertEqual(chr(f.output[x - 1]), self.sf.value[x - 1])
예제 #2
0
 def test_is_not_minimizable(self):
     f = InsertFuzzer(*self.args)
     self.assertFalse(f.is_minimizable)
예제 #3
0
 def test_fuzz_out_of_range(self):
     self.sf.tries = self.sf.len + 1
     with InsertFuzzer(*self.args) as f:
         self.assertRaises(FuzzerExhaustedError, f._fuzz)