Skip to content

Commit

Permalink
Bumped starlette version
Browse files Browse the repository at this point in the history
- Cleanup of imports
  • Loading branch information
hollandjake committed Jun 12, 2022
1 parent 41da477 commit 3fd4d13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions async_asgi_testclient/tests/test_testing.py
@@ -1,15 +1,14 @@
import ast

import starlette.status

from async_asgi_testclient import TestClient
import asyncio
import io
from http.cookies import SimpleCookie
from json import dumps
from sys import version_info as PY_VER # noqa

import asyncio
import io
import pytest
import starlette.status

from async_asgi_testclient import TestClient


@pytest.fixture
Expand Down Expand Up @@ -477,7 +476,7 @@ async def test_ws_connect_custom_scheme(starlette_app):
async def test_ws_endpoint_with_immediate_rejection(starlette_app):
async with TestClient(starlette_app, timeout=0.1) as client:
try:
async with client.websocket_connect("/ws-reject") as ws:
async with client.websocket_connect("/ws-reject"):
pass
except Exception as e:
thrown_exception = e
Expand All @@ -492,7 +491,7 @@ async def test_ws_endpoint_with_immediate_rejection(starlette_app):
async def test_invalid_ws_endpoint(starlette_app):
async with TestClient(starlette_app, timeout=0.1) as client:
try:
async with client.websocket_connect("/invalid") as ws:
async with client.websocket_connect("/invalid"):
pass
except Exception as e:
thrown_exception = e
Expand Down Expand Up @@ -536,6 +535,7 @@ async def test_quart_ws_connect_inherits_test_client_cookies(quart_app):


@pytest.mark.asyncio
@pytest.mark.skipif("PY_VER < (3,7)")
async def test_quart_ws_connect_default_scheme(quart_app):
async with TestClient(quart_app, timeout=0.1) as client:
async with client.websocket_connect("/ws") as ws:
Expand All @@ -559,7 +559,7 @@ async def test_quart_ws_connect_custom_scheme(quart_app):
async def test_quart_ws_endpoint_with_immediate_rejection(quart_app):
async with TestClient(quart_app, timeout=0.1) as client:
try:
async with client.websocket_connect("/ws-reject") as ws:
async with client.websocket_connect("/ws-reject"):
pass
except Exception as e:
thrown_exception = e
Expand All @@ -575,7 +575,7 @@ async def test_quart_ws_endpoint_with_immediate_rejection(quart_app):
async def test_quart_invalid_ws_endpoint(quart_app):
async with TestClient(quart_app, timeout=0.1) as client:
try:
async with client.websocket_connect("/invalid") as ws:
async with client.websocket_connect("/invalid"):
pass
except Exception as e:
thrown_exception = e
Expand Down
2 changes: 1 addition & 1 deletion test-requirements.txt
@@ -1,5 +1,5 @@
quart==0.10.0; python_version >= '3.7'
starlette==0.12.13
starlette==0.19.1
python-multipart==0.0.5
pytest==6.2.5
pytest-asyncio==0.15.0
Expand Down

0 comments on commit 3fd4d13

Please sign in to comment.