'Verify that the Ctrl+C stops the scan.'

def test_stop_by_keyboardinterrupt(self):

    w3afcore = w3afCore()
    mock_call = MagicMock(side_effect=KeyboardInterrupt())
    w3afcore.status.set_current_fuzzable_request = mock_call
    target_opts = create_target_option_list(URL(get_moth_http()))
    w3afcore.target.set_options(target_opts)
    w3afcore.plugins.set_plugins(['web_spider'], 'crawl')
    w3afcore.plugins.init_plugins()
    w3afcore.verify_environment()
    w3afcore.start()
