Skip to content

Commit

Permalink
Add missing asyncio markers to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Apr 27, 2022
1 parent 0617e9c commit a70ec2a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cylc/uiserver/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from tornado.httpclient import HTTPClientError


@pytest.mark.asyncio
@pytest.mark.integration
@pytest.mark.usefixtures("mock_authentication")
async def test_cylc_handler(patch_conf_files, jp_fetch):
Expand All @@ -31,6 +32,7 @@ async def test_cylc_handler(patch_conf_files, jp_fetch):
assert resp.code == 200


@pytest.mark.asyncio
@pytest.mark.integration
@pytest.mark.usefixtures("mock_authentication")
@pytest.mark.parametrize(
Expand Down Expand Up @@ -70,6 +72,7 @@ async def test_authorised_and_authenticated(
await _test(jp_fetch, endpoint, code, message, body)


@pytest.mark.asyncio
@pytest.mark.integration
@pytest.mark.usefixtures("mock_authentication_none")
@pytest.mark.parametrize(
Expand Down Expand Up @@ -109,6 +112,7 @@ async def test_unauthenticated(
await _test(jp_fetch, endpoint, code, message, body)


@pytest.mark.asyncio
@pytest.mark.integration
@pytest.mark.usefixtures("mock_authentication_yossarian")
@pytest.mark.parametrize(
Expand Down
2 changes: 2 additions & 0 deletions cylc/uiserver/tests/test_graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ async def _fetch(*endpoint, query=None, headers=None):
return _fetch


@pytest.mark.asyncio
async def test_query(gql_query, dummy_workflow):
"""Test sending the most basic GraphQL query."""
# configure two dummy workflows so we have something to look at
Expand Down Expand Up @@ -93,6 +94,7 @@ async def test_query(gql_query, dummy_workflow):
}


@pytest.mark.asyncio
async def test_multi(gql_query, monkeypatch, cylc_uis, dummy_workflow):
"""Ensure multi-mutation requests are properly forwarded.
Expand Down
1 change: 1 addition & 0 deletions cylc/uiserver/tests/test_workflows_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ async def test_multi_request_gather_errors(
assert caplog.records[0].exc_info[0] == error_type


@pytest.mark.asyncio
async def test_crashed_workflow(one_workflow_aiter, caplog, uis_caplog):
"""It should swallow client connect errors."""
# create a UIS, configure it for logging
Expand Down

0 comments on commit a70ec2a

Please sign in to comment.