Skip to content

Commit 9a0795d

Browse files
Replace mock_s3 by mock_aws in test_handlers.py.
1 parent 40847ee commit 9a0795d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

jupyter_drives/tests/test_handlers.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import os
77

88

9-
from moto import mock_s3
9+
from moto import mock_aws
1010
from moto.moto_server.threaded_moto_server import ThreadedMotoServer
1111
from libcloud.storage.types import Provider
1212
from libcloud.storage.providers import get_driver
@@ -17,15 +17,15 @@ def s3_base():
1717
os.environ["access_key_id"] = 'access_key'
1818
os.environ["secret_access_key"] = 'secret_key'
1919

20-
with mock_s3():
20+
with mock_aws():
2121
S3Drive = get_driver(Provider.S3)
2222
drive = S3Drive('access_key', 'secret_key')
2323

2424
yield drive
2525

2626
@pytest.mark.skip(reason="FIX")
2727
async def test_ListJupyterDrives_s3_success(jp_fetch, s3_base):
28-
with mock_s3():
28+
with mock_aws():
2929
# extract S3 drive
3030
drive = s3_base
3131

@@ -46,7 +46,7 @@ async def test_ListJupyterDrives_s3_success(jp_fetch, s3_base):
4646
assert "jupyter-drives-test-bucket-2" in payload["data"]
4747

4848
async def test_ListJupyterDrives_s3_empty_list(jp_fetch, s3_base):
49-
with mock_s3():
49+
with mock_aws():
5050
# extract S3 drive
5151
drive = s3_base
5252

@@ -60,7 +60,7 @@ async def test_ListJupyterDrives_s3_empty_list(jp_fetch, s3_base):
6060

6161
@pytest.mark.skip(reason="FIX")
6262
async def test_ListJupyterDrives_s3_missing_credentials(jp_fetch, s3_base):
63-
with mock_s3():
63+
with mock_aws():
6464
# When
6565
with pytest.raises(tornado.web.HTTPError) as exc_info:
6666
response = await jp_fetch("jupyter-drives", "drives")
@@ -70,7 +70,7 @@ async def test_ListJupyterDrives_s3_missing_credentials(jp_fetch, s3_base):
7070

7171
@pytest.mark.skip(reason="FIX")
7272
async def test_MountJupyterDriveHandler(jp_fetch, s3_base):
73-
with mock_s3():
73+
with mock_aws():
7474
drive = s3_base
7575

7676
# Create test container to mount
@@ -85,7 +85,7 @@ async def test_MountJupyterDriveHandler(jp_fetch, s3_base):
8585

8686
@pytest.mark.skip(reason="ToBeImplemented")
8787
async def test_UnmountJupyterDriveHandler(jp_fetch, s3_base):
88-
with mock_s3():
88+
with mock_aws():
8989
# extract S3 drive
9090
drive = s3_base
9191

0 commit comments

Comments
 (0)