From b7f6c2fce2c7b6e1ea24cdda5d5f041ba6cc1a01 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Tue, 23 Jan 2024 12:24:07 +0000 Subject: [PATCH] mark tornado tests as online --- tests/integration/test_tornado.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/integration/test_tornado.py b/tests/integration/test_tornado.py index 57973435..eeb326f5 100644 --- a/tests/integration/test_tornado.py +++ b/tests/integration/test_tornado.py @@ -51,6 +51,7 @@ def post(client, url, data=None, **kwargs): return client.fetch(http.HTTPRequest(url, method="POST", **kwargs)) +@pytest.mark.online @pytest.mark.gen_test def test_status_code(get_client, scheme, tmpdir): """Ensure that we can read the status code""" @@ -63,6 +64,7 @@ def test_status_code(get_client, scheme, tmpdir): assert 1 == cass.play_count +@pytest.mark.online @pytest.mark.gen_test def test_headers(get_client, scheme, tmpdir): """Ensure that we can read the headers back""" @@ -75,6 +77,7 @@ def test_headers(get_client, scheme, tmpdir): assert 1 == cass.play_count +@pytest.mark.online @pytest.mark.gen_test def test_body(get_client, tmpdir, scheme): """Ensure the responses are all identical enough""" @@ -101,6 +104,7 @@ def test_effective_url(get_client, tmpdir, httpbin): assert 1 == cass.play_count +@pytest.mark.online @pytest.mark.gen_test def test_auth(get_client, tmpdir, scheme): """Ensure that we can handle basic auth""" @@ -116,6 +120,7 @@ def test_auth(get_client, tmpdir, scheme): assert 1 == cass.play_count +@pytest.mark.online @pytest.mark.gen_test def test_auth_failed(get_client, tmpdir, scheme): """Ensure that we can save failed auth statuses""" @@ -139,6 +144,7 @@ def test_auth_failed(get_client, tmpdir, scheme): assert 1 == cass.play_count +@pytest.mark.online @pytest.mark.gen_test def test_post(get_client, tmpdir, scheme): """Ensure that we can post and cache the results""" @@ -154,6 +160,7 @@ def test_post(get_client, tmpdir, scheme): assert 1 == cass.play_count +@pytest.mark.online @pytest.mark.gen_test def test_redirects(get_client, tmpdir, scheme): """Ensure that we can handle redirects""" @@ -166,6 +173,7 @@ def test_redirects(get_client, tmpdir, scheme): assert cass.play_count == 1 +@pytest.mark.online @pytest.mark.gen_test def test_cross_scheme(get_client, tmpdir, scheme): """Ensure that requests between schemes are treated separately""" @@ -185,6 +193,7 @@ def test_cross_scheme(get_client, tmpdir, scheme): assert cass.play_count == 2 +@pytest.mark.online @pytest.mark.gen_test def test_gzip(get_client, tmpdir, scheme): """ @@ -210,6 +219,7 @@ def test_gzip(get_client, tmpdir, scheme): assert 1 == cass.play_count +@pytest.mark.online @pytest.mark.gen_test def test_https_with_cert_validation_disabled(get_client, tmpdir): cass_path = str(tmpdir.join("cert_validation_disabled.yaml")) @@ -263,6 +273,7 @@ def callback(chunk): assert "not yet supported by VCR" in str(response.error) +@pytest.mark.online @pytest.mark.gen_test def test_cannot_overwrite_cassette_raises_in_future(get_client, tmpdir): """Ensure that CannotOverwriteExistingCassetteException is raised inside @@ -318,6 +329,7 @@ def test_tornado_exception_can_be_caught(get_client): assert e.code == 404 +@pytest.mark.online @pytest.mark.gen_test def test_existing_references_get_patched(tmpdir): from tornado.httpclient import AsyncHTTPClient @@ -331,6 +343,7 @@ def test_existing_references_get_patched(tmpdir): assert cass.play_count == 1 +@pytest.mark.online @pytest.mark.gen_test def test_existing_instances_get_patched(get_client, tmpdir): """Ensure that existing instances of AsyncHTTPClient get patched upon @@ -346,6 +359,7 @@ def test_existing_instances_get_patched(get_client, tmpdir): assert cass.play_count == 1 +@pytest.mark.online @pytest.mark.gen_test def test_request_time_is_set(get_client, tmpdir): """Ensures that the request_time on HTTPResponses is set."""