Skip to content

Commit fae0f01

Browse files
Merge pull request #16 from HaudinFlorence/add_a_minor_change_in_base_python_file
Add minor changes in jupyter_drives in base.py and in tests/test_handlers.py
2 parents ce60845 + 9a0795d commit fae0f01

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

jupyter_drives/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _load_credentials(self):
8787

8888
# if not, try to load credentials from AWS CLI
8989
aws_credentials_path = "~/.aws/credentials" #add read me about credentials path in windows: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
90-
if os.path_exists(aws_credentials_path):
90+
if os.path.exists(aws_credentials_path):
9191
self.access_key_id, self.secret_access_key, self.session_token = self._extract_credentials_from_file(aws_credentials_path)
9292
return
9393

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)