Skip to content

Commit

Permalink
Add the aiohttp AND websockets mark to the aiohttp_websocket tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leszekhanusz committed Jul 13, 2024
1 parent 5653d56 commit f1fb25d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions tests/test_aiohttp_websocket_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

from .conftest import MS, WebSocketServerHelper

# Marking all tests in this file with the websockets marker
pytestmark = pytest.mark.aiohttp_websockets
# Marking all tests in this file with the aiohttp AND websockets marker
pytestmark = [pytest.mark.aiohttp, pytest.mark.websockets]

invalid_query_str = """
query getContinents {
Expand Down
4 changes: 2 additions & 2 deletions tests/test_aiohttp_websocket_graphql_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

from .conftest import WebSocketServerHelper

# Marking all tests in this file with the websockets marker
pytestmark = pytest.mark.aiohttp_websockets
# Marking all tests in this file with the aiohttp AND websockets marker
pytestmark = [pytest.mark.aiohttp, pytest.mark.websockets]

invalid_query_str = """
query getContinents {
Expand Down
4 changes: 2 additions & 2 deletions tests/test_aiohttp_websocket_graphql_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

from .conftest import MS, WebSocketServerHelper

# Marking all tests in this file with the websockets marker
pytestmark = pytest.mark.aiohttp_websockets
# Marking all tests in this file with the aiohttp AND websockets marker
pytestmark = [pytest.mark.aiohttp, pytest.mark.websockets]

countdown_server_answer = (
'{{"type":"next","id":"{query_id}","payload":{{"data":{{"number":{number}}}}}}}'
Expand Down
4 changes: 2 additions & 2 deletions tests/test_aiohttp_websocket_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

from .conftest import MS, WebSocketServerHelper

# Marking all tests in this file with the websockets marker
pytestmark = pytest.mark.aiohttp_websockets
# Marking all tests in this file with the aiohttp AND websockets marker
pytestmark = [pytest.mark.aiohttp, pytest.mark.websockets]

query1_str = """
query getContinents {
Expand Down
7 changes: 3 additions & 4 deletions tests/test_aiohttp_websocket_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
from .conftest import MS, WebSocketServerHelper
from .starwars.schema import StarWarsIntrospection, StarWarsSchema, StarWarsTypeDef

# Marking all tests in this file with the aiohttp AND websockets marker
pytestmark = [pytest.mark.aiohttp, pytest.mark.websockets]

starwars_expected_one = {
"stars": 3,
"commentary": "Was expecting more stuff",
Expand Down Expand Up @@ -77,9 +80,6 @@ async def server_starwars(ws, path):
}
"""

# Marking all tests in this file with the websockets marker
pytestmark = pytest.mark.aiohttp_websockets

countdown_server_answer = (
'{{"type":"data","id":"{query_id}","payload":{{"data":{{"number":{number}}}}}}}'
)
Expand Down Expand Up @@ -711,7 +711,6 @@ def test_code():
await run_sync_test(event_loop, server, test_code)


@pytest.mark.aiohttp_websockets
@pytest.mark.asyncio
@pytest.mark.parametrize("server", [server_starwars], indirect=True)
@pytest.mark.parametrize("subscription_str", [starwars_subscription_str])
Expand Down

0 comments on commit f1fb25d

Please sign in to comment.