Skip to content

Commit

Permalink
disable not passing and slow tests after merging feature/js branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Q-back committed Jun 16, 2020
1 parent 2a39b29 commit a4b5c6b
Show file tree
Hide file tree
Showing 23 changed files with 99 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import pytest

from w3af.core.controllers.chrome.crawler.tests.base import BaseChromeCrawlerTest
from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler

Expand Down Expand Up @@ -68,6 +70,7 @@ def test_angular_two_button_click_179(self):
found, not_found = self._log_contains(expected_messages)
self.assertEqual(not_found, [])

@pytest.mark.deprecated
def test_angular_example_conduit(self):
url = 'https://angularjs.realworld.io/'

Expand Down Expand Up @@ -217,4 +220,4 @@ class AngularTwoButtonClickRequestHandler179(ExtendedHttpRequestHandler):
</body>
</html>
'''
'''
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import pytest

from w3af.core.controllers.chrome.crawler.tests.base import BaseChromeCrawlerTest


Expand Down Expand Up @@ -49,6 +51,7 @@ def test_react_hello_world_app(self):
found, not_found = self._log_contains(expected_messages)
self.assertEqual(not_found, [])

@pytest.mark.deprecated
def test_react_autosuggest(self):
url = 'https://dist-usikpayhrn.now.sh/'
found_uris = self._crawl(url)
Expand All @@ -75,6 +78,7 @@ def test_react_autosuggest(self):
found, not_found = self._log_contains(expected_messages)
self.assertEqual(not_found, [])

@pytest.mark.slow
def test_react_icons_menu(self):
url = 'https://react-icons-kit.now.sh/'
found_uris = self._crawl(url)
Expand All @@ -100,6 +104,7 @@ def test_react_icons_menu(self):
found, not_found = self._log_contains(expected_messages)
self.assertEqual(not_found, [])

@pytest.mark.deprecated
def test_react_button(self):
url = 'https://84ol32ono9.csb.app/'
found_uris = self._crawl(url)
Expand Down Expand Up @@ -134,6 +139,7 @@ def test_react_button(self):
found, not_found = self._log_contains(expected_messages)
self.assertEqual(not_found, [])

@pytest.mark.deprecated
def test_react_cart(self):
#
# Source code for this application lives at:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import pprint

from collections import OrderedDict

import pytest
from nose.plugins.attrib import attr

from w3af.core.controllers.chrome.crawler.main import ChromeCrawler
Expand All @@ -37,6 +39,7 @@


@attr('internet')
@pytest.mark.deprecated
class TestChromeCrawlerInternetPages(unittest.TestCase):
"""
This test is the result of debugging and experimenting how the crawler will
Expand Down
3 changes: 3 additions & 0 deletions w3af/core/controllers/chrome/crawler/tests/test_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import time
import unittest

import pytest

import w3af.core.data.kb.config as cf

from w3af.core.controllers.output_manager import manager
Expand Down Expand Up @@ -112,6 +114,7 @@ def tearDown(self):
self.pool.terminate()
self.pool.join()

@pytest.mark.deprecated
def test_parse_dom(self):
t, s, p = start_webserver_any_free_port(self.SERVER_HOST,
webroot=self.SERVER_ROOT_PATH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import pytest

from w3af.core.controllers.chrome.crawler.tests.base import BaseChromeCrawlerTest
from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler
from w3af.core.controllers.chrome.crawler.strategies.js import ChromeCrawlerJS
Expand All @@ -40,6 +42,7 @@ def _get_request_response(self, _id):

return fuzzable_request, http_response

@pytest.mark.slow
def test_crawl_pages_with_same_footer(self):
self._unittest_setup(MultiplePagesWithSameFooter)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import pytest

from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler
from w3af.core.controllers.chrome.tests.base import BaseInstrumentedUnittest


class TestFocusElement(BaseInstrumentedUnittest):

@pytest.mark.slow
def test_load_focus(self):
self._unittest_setup(FormFocusHandler)

Expand Down Expand Up @@ -59,4 +62,4 @@ class FormFocusHandler(ExtendedHttpRequestHandler):
console.log("blur");
}
</script>
'''
'''
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from urlparse import urlparse

import pytest
from websocket import WebSocketConnectionClosedException

from w3af import ROOT_PATH
Expand All @@ -39,6 +40,7 @@ def test_terminate(self):
self._unittest_setup(ExtendedHttpRequestHandler)
self.ic.terminate()

@pytest.mark.deprecated
def test_start_and_load_http(self):
self._unittest_setup(ExtendedHttpRequestHandler, load_url=False)

Expand All @@ -58,22 +60,26 @@ def test_start_and_load_http(self):
self.assertEqual(response.get_body(), ExtendedHttpRequestHandler.RESPONSE_BODY)
self.assertIn('Mozilla/', request.get_headers().get('User-agent'))

@pytest.mark.deprecated
def test_load_about_blank(self):
self._unittest_setup(ExtendedHttpRequestHandler, load_url=False)
self.ic.load_about_blank()
self.assertEqual(self.http_traffic_queue.qsize(), 0)

@pytest.mark.deprecated
def test_get_pid(self):
self._unittest_setup(ExtendedHttpRequestHandler)
pid = self.ic.get_pid()
self.assertIsInstance(pid, (int, long))

@pytest.mark.deprecated
def test_get_memory_usage(self):
self._unittest_setup(ExtendedHttpRequestHandler)
private, shared = self.ic.get_memory_usage()
self.assertIsInstance(private, int)
self.assertIsInstance(shared, int)

@pytest.mark.deprecated
def test_start_and_load_https_self_signed(self):
# Define the HTTP response
http_response = ('HTTP/1.1 200 Ok\r\n'
Expand Down Expand Up @@ -113,6 +119,7 @@ def test_start_and_load_https_self_signed(self):

s.stop()

@pytest.mark.deprecated
def test_initial_connection_to_chrome_fails(self):
self._unittest_setup(ExtendedHttpRequestHandler)
self.ic.chrome_process.get_devtools_port = lambda: 1
Expand All @@ -131,6 +138,7 @@ def test_connection_to_chrome_fails_after_page_load(self):
# Trigger it here
self.assertRaises(WebSocketConnectionClosedException, self.ic.load_url, url)

@pytest.mark.deprecated
def test_proxy_dies(self):
self._unittest_setup(ExtendedHttpRequestHandler)

Expand All @@ -141,6 +149,7 @@ def test_proxy_dies(self):
url = 'http://%s:%s/' % (self.SERVER_HOST, self.server_port)
self.assertRaises(ChromeInterfaceException, self.ic.load_url, url)

@pytest.mark.deprecated
def test_exception_handling_in_custom_handlers(self):
self._unittest_setup(ExtendedHttpRequestHandler)

Expand All @@ -163,6 +172,7 @@ def raises_exception(message):
self.ic.wait_for_load()
self.assertEqual(self.ic.get_dom(), ExtendedHttpRequestHandler.RESPONSE_BODY)

@pytest.mark.deprecated
def test_websocket_call_triggers_error_in_chrome(self):
self._unittest_setup(ExtendedHttpRequestHandler)

Expand All @@ -172,6 +182,7 @@ def test_websocket_call_triggers_error_in_chrome(self):

class TestInstrumentedChromeWithDialogDismiss(BaseInstrumentedUnittest):

@pytest.mark.deprecated
def test_load_page_with_alert(self):
self._unittest_setup(CreateAlertHandler)
url = 'http://%s:%s/' % (self.SERVER_HOST, self.server_port)
Expand Down Expand Up @@ -208,6 +219,7 @@ def test_load_page_with_alert(self):

class TestInstrumentedChromeWith401(BaseInstrumentedUnittest):

@pytest.mark.deprecated
def test_load_page_with_401(self):
# It is possible to load a URL that returns a 401 and then load
# any other URL in the same browser instance
Expand Down Expand Up @@ -243,6 +255,7 @@ def test_load_page_with_401(self):

class TestInstrumentedChromeWith301Redirect(BaseInstrumentedUnittest):

@pytest.mark.deprecated
def test_load_page_with_redirect_301(self):
self._unittest_setup(RedirectRequestHandler, load_url=False)
url = 'http://%s:%s/' % (self.SERVER_HOST, self.server_port)
Expand All @@ -257,6 +270,7 @@ def test_load_page_with_redirect_301(self):

class TestInstrumentedChromeReadJSVariables(BaseInstrumentedUnittest):

@pytest.mark.deprecated
def test_load_page_read_js_variable(self):
self._unittest_setup(JSVariablesHandler)
url = 'http://%s:%s/' % (self.SERVER_HOST, self.server_port)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@
"""
import time

import pytest

from w3af.core.controllers.chrome.tests.base import BaseInstrumentedUnittest
from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler
from w3af.core.controllers.chrome.instrumented.tests.test_instrumented_event_listeners import (EventListenerInDocument,
EventListenerInWindow)
from w3af.core.controllers.chrome.instrumented.tests.test_instrumented_event_listeners import (EventListenerInDocument, EventListenerInWindow)


pytestmark = pytest.mark.deprecated


class TestChromeCrawlerDispatchEvents(BaseInstrumentedUnittest):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import pytest

from w3af.core.controllers.chrome.tests.base import BaseInstrumentedUnittest
from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler


pytestmark = pytest.mark.deprecated


class TestChromeCrawlerDOMChanges(BaseInstrumentedUnittest):
def test_onclick_change_location_detect_dom_change(self):
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import pytest

from w3af.core.controllers.chrome.tests.base import BaseInstrumentedUnittest
from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler


@pytest.mark.deprecated
class TestChromeCrawlerGetEventListeners(BaseInstrumentedUnittest):
def test_no_event_handlers_empty(self):
self._unittest_setup(EmptyRequestHandler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@
"""
import pprint

import pytest

from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler
from w3af.core.controllers.chrome.instrumented.paginate import PAGINATION_PAGE_COUNT
from w3af.core.controllers.chrome.instrumented.tests.test_instrumented_event_listeners import OnClickEventSetOnClickRequestHandler
from w3af.core.controllers.chrome.tests.base import BaseInstrumentedUnittest


pytestmark = pytest.mark.deprecated


class TestChromeCrawlerGetHTMLEventListeners(BaseInstrumentedUnittest):
def test_no_event_handlers_empty(self):
self._unittest_setup(EmptyRequestHandler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@

from urlparse import urlparse

import pytest

from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler
from w3af.core.controllers.chrome.tests.base import BaseInstrumentedUnittest


pytestmark = pytest.mark.deprecated


class TestInstrumentedChromeOneIframe(BaseInstrumentedUnittest):

def test_load_page_with_iframe(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@
"""
import time

import pytest

from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler
from w3af.core.controllers.chrome.tests.base import BaseInstrumentedUnittest
from w3af.core.controllers.chrome.instrumented.event_listener import EventListener
from w3af.core.controllers.chrome.instrumented.page_state import PageState
from w3af.core.controllers.chrome.instrumented.frame import Frame


pytestmark = pytest.mark.deprecated


class TestMightLoadPage(BaseInstrumentedUnittest):
"""
This unittest asserts that all cases associated with PageState.MIGHT_NAVIGATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import pytest

from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler
from w3af.core.controllers.chrome.tests.base import BaseInstrumentedUnittest


HELLO = 'hello world'



@pytest.mark.deprecated
class PressKeys(BaseInstrumentedUnittest):

def test_press_keys(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@
"""
from __future__ import print_function

import pytest
from nose.plugins.attrib import attr

from w3af.core.controllers.chrome.instrumented.tests.base import BaseEventListenerCountTest
from w3af.core.controllers.chrome.instrumented.event_listener import EventListener


pytestmark = pytest.mark.deprecated


@attr('internet')
class TestCountEventListeners(BaseEventListenerCountTest):
def test_button_onclick(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
along with w3af; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import pytest

from w3af.core.controllers.chrome.tests.helpers import ExtendedHttpRequestHandler
from w3af.core.controllers.chrome.tests.base import BaseInstrumentedUnittest


pytestmark = pytest.mark.deprecated
HELLO = 'hello world'


Expand Down
Loading

0 comments on commit a4b5c6b

Please sign in to comment.