Ejemplo n.º 1
0
 def test_stop(self):
   mock_device = MockDevice()
   pids = mock_device.getpids()
   fuzzer1 = Fuzzer(mock_device, u'mock-package1', u'mock-target1')
   fuzzer1.stop()
   self.assertEqual(
       mock_device.last, 'ssh -F ' + mock_device.host.ssh_config +
       ' ::1 kill ' + str(pids[fuzzer1.tgt]))
   fuzzer3 = Fuzzer(mock_device, u'mock-package1', u'mock-target3')
   fuzzer3.stop()
Ejemplo n.º 2
0
 def test_stop(self):
     mock_device = MockDevice()
     pids = mock_device.getpids()
     fuzzer1 = Fuzzer(mock_device, u'mock-package1', u'mock-target1')
     fuzzer1.stop()
     self.assertIn(
         ' '.join(
             mock_device.get_ssh_cmd(
                 ['ssh', '::1', 'kill',
                  str(pids[fuzzer1.tgt])])), mock_device.host.history)
     fuzzer3 = Fuzzer(mock_device, u'mock-package1', u'mock-target3')
     fuzzer3.stop()