Skip to content

Commit

Permalink
mark tornado tests as online
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Jan 23, 2024
1 parent 6d7a842 commit b7f6c2f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integration/test_tornado.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand All @@ -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"""
Expand All @@ -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"""
Expand All @@ -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"""
Expand All @@ -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"""
Expand All @@ -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"""
Expand All @@ -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"""
Expand All @@ -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"""
Expand All @@ -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):
"""
Expand All @@ -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"))
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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."""
Expand Down

0 comments on commit b7f6c2f

Please sign in to comment.