Skip to content

Commit

Permalink
fix compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed Aug 4, 2023
1 parent 533495a commit 589e344
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
7 changes: 6 additions & 1 deletion propan/test/kafka.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import sys
from datetime import datetime
from types import MethodType
from typing import Any, Dict, Optional
from unittest.mock import AsyncMock

if sys.version_info < (3, 8):
from asyncmock import AsyncMock
else:
from unittest.mock import AsyncMock

from aiokafka.structs import ConsumerRecord

Expand Down
7 changes: 6 additions & 1 deletion propan/test/nats.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import sys
from types import MethodType
from typing import Any, Dict, Optional, Union
from unittest.mock import AsyncMock

if sys.version_info < (3, 8):
from asyncmock import AsyncMock
else:
from unittest.mock import AsyncMock
from uuid import uuid4

from nats.aio.msg import Msg
Expand Down
7 changes: 6 additions & 1 deletion propan/test/rabbit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import re
import sys
from contextlib import asynccontextmanager
from types import MethodType
from typing import Any, Optional, Union
from unittest.mock import AsyncMock

if sys.version_info < (3, 8):
from asyncmock import AsyncMock
else:
from unittest.mock import AsyncMock
from uuid import uuid4

import aiormq
Expand Down
7 changes: 6 additions & 1 deletion propan/test/redis.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import re
import sys
from types import MethodType
from typing import Any, Dict, Optional, Union
from unittest.mock import AsyncMock

if sys.version_info < (3, 8):
from asyncmock import AsyncMock
else:
from unittest.mock import AsyncMock

from typing_extensions import TypeAlias

Expand Down
7 changes: 6 additions & 1 deletion propan/test/sqs.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import json
import sys
from hashlib import md5
from types import MethodType
from typing import Any, Dict, Optional
from unittest.mock import AsyncMock

if sys.version_info < (3, 8):
from asyncmock import AsyncMock
else:
from unittest.mock import AsyncMock
from uuid import uuid4

from propan import SQSBroker
Expand Down

0 comments on commit 589e344

Please sign in to comment.