@@ -267,18 +267,13 @@ def test_diff_and_filter_exports(self, tmp_path):
267
267
}
268
268
269
269
270
- @pytest .fixture (scope = "function" )
271
- def s3_client ():
272
- with mock_s3 ():
273
- yield Session (** AWS_CREDENTIALS ).client ("s3" )
274
-
275
-
276
270
class TestS3ArchiveDiffer :
277
271
bucket_name = "test-bucket"
278
272
indicator_prefix = "test"
279
273
280
274
@mock_s3
281
- def test_update_cache (self , tmp_path , s3_client ):
275
+ def test_update_cache (self , tmp_path ):
276
+ s3_client = Session (** AWS_CREDENTIALS ).client ("s3" )
282
277
cache_dir = join (str (tmp_path ), "cache" )
283
278
export_dir = join (str (tmp_path ), "export" )
284
279
mkdir (cache_dir )
@@ -316,7 +311,8 @@ def test_update_cache(self, tmp_path, s3_client):
316
311
assert set (listdir (cache_dir )) == {"csv1.csv" , "csv2.csv" }
317
312
318
313
@mock_s3
319
- def test_archive_exports (self , tmp_path , s3_client ):
314
+ def test_archive_exports (self , tmp_path ):
315
+ s3_client = Session (** AWS_CREDENTIALS ).client ("s3" )
320
316
cache_dir = join (str (tmp_path ), "cache" )
321
317
export_dir = join (str (tmp_path ), "export" )
322
318
mkdir (cache_dir )
@@ -347,7 +343,8 @@ def test_archive_exports(self, tmp_path, s3_client):
347
343
assert_frame_equal (pd .read_csv (body , dtype = CSV_DTYPES ), csv1 )
348
344
349
345
@mock_s3
350
- def test_run (self , tmp_path , s3_client ):
346
+ def test_run (self , tmp_path ):
347
+ s3_client = Session (** AWS_CREDENTIALS ).client ("s3" )
351
348
cache_dir = join (str (tmp_path ), "cache" )
352
349
export_dir = join (str (tmp_path ), "export" )
353
350
mkdir (cache_dir )
0 commit comments