Skip to content

Commit da1c4d6

Browse files
author
Darren Weber
committed
WIP to package aiobotocore.aiomoto
This is aimed to resolve the setup entry point problem, but it might not be entirely desirable in this form. At least in a dev-venv, the `pytest tests/aiomoto` is passing.
1 parent 46dce13 commit da1c4d6

15 files changed

+25
-28
lines changed
File renamed without changes.

tests/aws/aio/aiomoto_fixtures.py aiobotocore/aiomoto/aiomoto_fixtures.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
import aiobotocore.config
77
import pytest
88

9-
from tests.aws.aio.aiomoto_services import MotoService
10-
from tests.aws.utils import AWS_ACCESS_KEY_ID
11-
from tests.aws.utils import AWS_SECRET_ACCESS_KEY
9+
from aiobotocore.aiomoto.aiomoto_services import MotoService
10+
from aiobotocore.aiomoto.utils import AWS_ACCESS_KEY_ID
11+
from aiobotocore.aiomoto.utils import AWS_SECRET_ACCESS_KEY
1212

1313

1414
#
File renamed without changes.

tests/aws/aws_fixtures.py aiobotocore/aiomoto/aws_fixtures.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55

66
import boto3
77
import pytest
8+
89
from moto import mock_batch
910
from moto import mock_ec2
1011
from moto import mock_ecs
1112
from moto import mock_iam
1213
from moto import mock_logs
1314
from moto import mock_s3
1415

15-
from tests.aws.utils import AWS_REGION
16-
from tests.aws.utils import AWS_ACCESS_KEY_ID
17-
from tests.aws.utils import AWS_SECRET_ACCESS_KEY
16+
from aiobotocore.aiomoto.utils import AWS_REGION
17+
from aiobotocore.aiomoto.utils import AWS_ACCESS_KEY_ID
18+
from aiobotocore.aiomoto.utils import AWS_SECRET_ACCESS_KEY
1819

1920
AWS_HOST = "127.0.0.1"
2021
AWS_PORT = "5000"
File renamed without changes.

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def read(f):
2727
extras_require = {
2828
'awscli': ['awscli==1.16.278'],
2929
'boto3': ['boto3==1.10.14'],
30+
'aiomoto': ['moto==1.3.14'],
3031
}
3132

3233

@@ -77,5 +78,5 @@ def read_version():
7778
install_requires=install_requires,
7879
extras_require=extras_require,
7980
include_package_data=True,
80-
# entry_points={'pytest11': ['aiomoto = tests.aws.aio.aiomoto_fixtures.py']},
81+
entry_points={'pytest11': ['aiomoto = aiobotocore.aiomoto']},
8182
)
File renamed without changes.

tests/aws/aio/test_aio_aws_s3.py tests/aiomoto/test_aio_aws_s3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from tests.aws.utils import response_success
3+
from aiobotocore.aiomoto.utils import response_success
44

55

66
@pytest.fixture

tests/aws/aio/test_aiomoto_clients.py tests/aiomoto/test_aiomoto_clients.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
from aiobotocore.client import AioBaseClient
1515
from aiobotocore.session import AioSession
1616

17-
from tests.aws.utils import AWS_REGION
18-
from tests.aws.utils import AWS_ACCESS_KEY_ID
19-
from tests.aws.utils import AWS_SECRET_ACCESS_KEY
20-
from tests.aws.utils import has_moto_mocks
21-
from tests.aws.utils import response_success
17+
from aiobotocore.aiomoto.utils import AWS_REGION
18+
from aiobotocore.aiomoto.utils import AWS_ACCESS_KEY_ID
19+
from aiobotocore.aiomoto.utils import AWS_SECRET_ACCESS_KEY
20+
from aiobotocore.aiomoto.utils import has_moto_mocks
21+
from aiobotocore.aiomoto.utils import response_success
2222

2323

2424
def test_aio_aws_session_credentials(aio_aws_session):

tests/aws/aio/test_aiomoto_service.py tests/aiomoto/test_aiomoto_service.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import aiohttp
1111
import pytest
1212

13-
from tests.aws.aio.aiomoto_services import HOST
14-
from tests.aws.aio.aiomoto_services import MotoService
13+
from aiobotocore.aiomoto.aiomoto_services import HOST
14+
from aiobotocore.aiomoto.aiomoto_services import MotoService
1515

1616

1717
def test_moto_service():

tests/aws/test_aws_fixtures.py tests/aiomoto/test_aws_fixtures.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
from botocore.client import BaseClient
1111

12-
from tests.aws.utils import AWS_REGION
13-
from tests.aws.utils import AWS_ACCESS_KEY_ID
14-
from tests.aws.utils import AWS_SECRET_ACCESS_KEY
15-
from tests.aws.utils import has_moto_mocks
16-
from tests.aws.utils import response_success
12+
from aiobotocore.aiomoto.utils import AWS_REGION
13+
from aiobotocore.aiomoto.utils import AWS_ACCESS_KEY_ID
14+
from aiobotocore.aiomoto.utils import AWS_SECRET_ACCESS_KEY
15+
from aiobotocore.aiomoto.utils import has_moto_mocks
16+
from aiobotocore.aiomoto.utils import response_success
1717

1818

1919
def test_aws_credentials(aws_credentials):

tests/aws/test_aws_s3.py tests/aiomoto/test_aws_s3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from tests.aws.utils import response_success
3+
from aiobotocore.aiomoto.utils import response_success
44

55

66
@pytest.fixture

tests/aws/aio/__init__.py

Whitespace-only changes.

tests/aws/conftest.py

-5
This file was deleted.

tests/conftest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,6 @@ async def delete_sqs_queue(sqs_client, queue_url):
472472

473473
pytest_plugins = [
474474
"tests.mock_server",
475-
"tests.aws.aws_fixtures",
476-
"tests.aws.aio.aiomoto_fixtures",
475+
"aiobotocore.aiomoto.aws_fixtures",
476+
"aiobotocore.aiomoto.aiomoto_fixtures",
477477
]

0 commit comments

Comments
 (0)