From 9ceb3ddaa9b9ccea830fd68c5263122ac548dd81 Mon Sep 17 00:00:00 2001 From: mnunzio Date: Mon, 14 Mar 2022 22:38:23 +0100 Subject: [PATCH] feat: clean useless code --- tests/conftest.py | 10 ++-------- tests/test_async_client.py | 5 +++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 54f8c6a1..d33b3874 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,8 +1,9 @@ """PyTest Fixtures""" -import asyncio import logging import os + import pytest + from pyodata.v2.model import schema_from_xml, Types @@ -140,10 +141,3 @@ def type_date_time(): @pytest.fixture def type_date_time_offset(): return Types.from_name('Edm.DateTimeOffset') - - -@pytest.fixture -def event_loop(): - loop = asyncio.new_event_loop() - yield loop - loop.run_until_complete(asyncio.sleep(0.1, loop=loop)) diff --git a/tests/test_async_client.py b/tests/test_async_client.py index bf4cbdac..ffbfa4fb 100644 --- a/tests/test_async_client.py +++ b/tests/test_async_client.py @@ -1,5 +1,5 @@ """PyOData Client tests""" -from unittest.mock import patch, AsyncMock +from unittest.mock import patch import aiohttp import pytest @@ -106,7 +106,8 @@ async def test_client_custom_configuration(mock_warning, aiohttp_client, metadat }) app = web.Application() - app.router.add_get('/$metadata', generate_metadata_response(headers={'content-type': 'application/xml'},body=metadata)) + app.router.add_get('/$metadata', + generate_metadata_response(headers={'content-type': 'application/xml'}, body=metadata)) client = await aiohttp_client(app) with pytest.raises(PyODataException) as e_info: