'Watchdog restarts the process on suspicious high activity.'

@patch.object(Watchdog, 'self_destruct', side_effect=WatchdogKill)
def test_watchdog_frenesy_detection(self, mock_restarted):

    Watchdog._RESTART_TIMEFRAME = 1
    process_watchdog = Watchdog(10, max_resets=3)
    ping_watchdog = process_watchdog.reset
    with self.set_time(1):
        for x in xrange(0, 3):
            ping_watchdog()
        self.assertRaises(WatchdogKill, ping_watchdog)
    with self.set_time(3):
        ping_watchdog()
