Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""PyTest Fixtures"""
import asyncio
import logging
import os

import pytest

from pyodata.v2.model import schema_from_xml, Types


Expand Down Expand Up @@ -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))
5 changes: 3 additions & 2 deletions tests/test_async_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""PyOData Client tests"""
from unittest.mock import patch, AsyncMock
from unittest.mock import patch

import aiohttp
import pytest
Expand Down Expand Up @@ -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:
Expand Down