From b73dca636c07f5d3d48eacbb8a93896c430909af Mon Sep 17 00:00:00 2001 From: Simon Boehm Date: Mon, 23 Nov 2020 16:53:49 +0100 Subject: [PATCH] Fix fs store test patching & creating directories --- tests/test_store_creation.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_store_creation.py b/tests/test_store_creation.py index 8ec5afe..9559004 100644 --- a/tests/test_store_creation.py +++ b/tests/test_store_creation.py @@ -112,6 +112,7 @@ def test_create_store_s3(mocker): def test_create_store_hfs(mocker): mock_hfs = mocker.patch("storefact._hstores.HFilesystemStore") + mock_makedirs = mocker.patch("os.makedirs") create_store( "hfs", { @@ -121,11 +122,12 @@ def test_create_store_hfs(mocker): }, ) mock_hfs.assert_called_once_with('this/is/a/relative/path') + mock_makedirs.assert_called_once_with('this/is/a/relative/path') -@pytest.mark.skip(reason="some issue here") def test_create_store_fs(mocker): - mock_fs = mocker.patch("simplekv.fs.FilesystemStore") + mock_fs = mocker.patch("storefact._store_creation.FilesystemStore") + mock_makedirs = mocker.patch("os.makedirs") create_store( "fs", { @@ -135,6 +137,7 @@ def test_create_store_fs(mocker): } ) mock_fs.assert_called_once_with('this/is/a/relative/fspath') + mock_makedirs.assert_called_once_with('this/is/a/relative/fspath') def test_create_store_mem(mocker):