Skip to content

Commit

Permalink
Switch from async_case to unittest to support python 3.10
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin <gavinfreeborn@gmail.com>
  • Loading branch information
Gavinok committed Aug 18, 2023
1 parent e5f7e4d commit b10c922
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 11 deletions.
6 changes: 1 addition & 5 deletions aries_cloudagent/admin/tests/test_admin_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import pytest
import mock as async_mock
from async_case import IsolatedAsyncioTestCase

from unittest import IsolatedAsyncioTestCase
from aiohttp import ClientSession, DummyCookieJar, TCPConnector, web
from aiohttp.test_utils import unused_port

Expand Down Expand Up @@ -303,7 +302,6 @@ async def test_register_external_plugin_x(self):
logs.output
)

@pytest.mark.skip(reason="async_case library not compatible with python 3.10")
async def test_visit_insecure_mode(self):
settings = {"admin.admin_insecure_mode": True, "task_queue": True}
server = self.get_admin_server(settings)
Expand Down Expand Up @@ -335,7 +333,6 @@ async def test_visit_insecure_mode(self):

await server.stop()

@pytest.mark.skip(reason="async_case library not compatible with python 3.10")
async def test_visit_secure_mode(self):
settings = {
"admin.admin_insecure_mode": False,
Expand Down Expand Up @@ -388,7 +385,6 @@ async def test_visit_secure_mode(self):

await server.stop()

@pytest.mark.skip(reason="async_case library not compatible with python 3.10")
async def test_query_config(self):
settings = {
"admin.admin_insecure_mode": False,
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/core/tests/test_conductor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from io import StringIO

import mock as async_mock
from async_case import IsolatedAsyncioTestCase
from unittest import IsolatedAsyncioTestCase

from ...admin.base_server import BaseAdminServer
from ...config.base_context import ContextBuilder
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/core/tests/test_dispatcher.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json

from async_case import IsolatedAsyncioTestCase
from unittest import IsolatedAsyncioTestCase
import mock as async_mock
import pytest

Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/core/tests/test_util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from async_case import IsolatedAsyncioTestCase
from unittest import IsolatedAsyncioTestCase

from ...cache.base import BaseCache
from ...cache.in_memory import InMemoryCache
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/ledger/tests/test_routes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Tuple

from async_case import IsolatedAsyncioTestCase
from unittest import IsolatedAsyncioTestCase
import mock as async_mock

from ...core.in_memory import InMemoryProfile
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/wallet/tests/test_routes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import mock as async_mock
import pytest
from aiohttp.web import HTTPForbidden
from async_case import IsolatedAsyncioTestCase
from unittest import IsolatedAsyncioTestCase

from ...admin.request_context import AdminRequestContext
from ...core.in_memory import InMemoryProfile
Expand Down
1 change: 0 additions & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
asynctest==0.13.0
async-case~=10.1
pytest~=7.4.0
pytest-asyncio==0.14.0
pytest-cov==2.10.1
Expand Down

0 comments on commit b10c922

Please sign in to comment.