From ca1e46495d7560458cad4924b6146295e349dc6f Mon Sep 17 00:00:00 2001 From: Matthew Seal Date: Sun, 26 Aug 2018 14:05:27 -0600 Subject: [PATCH] Attempt to fix s3 tests --- papermill/tests/test_s3.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/papermill/tests/test_s3.py b/papermill/tests/test_s3.py index c8ac4f6a..1e4b9e68 100644 --- a/papermill/tests/test_s3.py +++ b/papermill/tests/test_s3.py @@ -2,6 +2,7 @@ import os.path import pytest +import boto3 import moto from moto import mock_s3 @@ -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()