Skip to content

Commit

Permalink
Attempt to fix s3 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeal committed Aug 26, 2018
1 parent 74fab1a commit ca1e464
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions papermill/tests/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os.path
import pytest
import boto3
import moto
from moto import mock_s3

Expand Down Expand Up @@ -176,14 +177,14 @@ def test_split_error():

read_from_gen = lambda g: "\n".join(g)


@pytest.yield_fixture
@pytest.yield_fixture(scope="function")
def s3_client():
mock_s3 = moto.mock_s3()
mock_s3.start()
import boto3

client = boto3.client('s3')
client = boto3.client('s3',
aws_access_key_id='fake',
aws_secret_access_key= 'fake')
client.create_bucket(Bucket=test_bucket_name)
client.put_object(Bucket=test_bucket_name, Key=test_file_path, Body=test_nb_content)
yield S3()
Expand Down

0 comments on commit ca1e464

Please sign in to comment.