Skip to content

Commit 59481e3

Browse files
authored
Merge pull request #1550 from cmu-delphi/ds/moto-fix
Fix breaking moto update
2 parents 098040d + c440916 commit 59481e3

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

_delphi_utils_python/tests/test_archive.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -267,18 +267,13 @@ def test_diff_and_filter_exports(self, tmp_path):
267267
}
268268

269269

270-
@pytest.fixture(scope="function")
271-
def s3_client():
272-
with mock_s3():
273-
yield Session(**AWS_CREDENTIALS).client("s3")
274-
275-
276270
class TestS3ArchiveDiffer:
277271
bucket_name = "test-bucket"
278272
indicator_prefix = "test"
279273

280274
@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")
282277
cache_dir = join(str(tmp_path), "cache")
283278
export_dir = join(str(tmp_path), "export")
284279
mkdir(cache_dir)
@@ -316,7 +311,8 @@ def test_update_cache(self, tmp_path, s3_client):
316311
assert set(listdir(cache_dir)) == {"csv1.csv", "csv2.csv"}
317312

318313
@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")
320316
cache_dir = join(str(tmp_path), "cache")
321317
export_dir = join(str(tmp_path), "export")
322318
mkdir(cache_dir)
@@ -347,7 +343,8 @@ def test_archive_exports(self, tmp_path, s3_client):
347343
assert_frame_equal(pd.read_csv(body, dtype=CSV_DTYPES), csv1)
348344

349345
@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")
351348
cache_dir = join(str(tmp_path), "cache")
352349
export_dir = join(str(tmp_path), "export")
353350
mkdir(cache_dir)

0 commit comments

Comments
 (0)