Skip to content

Commit 52a5023

Browse files
authored
Merge pull request #20 from siboehm/fsstore_test
Fix fs store test patching & creating directories
2 parents 6baa2d5 + b73dca6 commit 52a5023

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_store_creation.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def test_create_store_s3(mocker):
138138

139139
def test_create_store_hfs(mocker):
140140
mock_hfs = mocker.patch("storefact._hstores.HFilesystemStore")
141+
mock_makedirs = mocker.patch("os.makedirs")
141142
create_store(
142143
"hfs",
143144
{
@@ -147,11 +148,12 @@ def test_create_store_hfs(mocker):
147148
},
148149
)
149150
mock_hfs.assert_called_once_with('this/is/a/relative/path')
151+
mock_makedirs.assert_called_once_with('this/is/a/relative/path')
150152

151153

152-
@pytest.mark.skip(reason="some issue here")
153154
def test_create_store_fs(mocker):
154-
mock_fs = mocker.patch("simplekv.fs.FilesystemStore")
155+
mock_fs = mocker.patch("storefact._store_creation.FilesystemStore")
156+
mock_makedirs = mocker.patch("os.makedirs")
155157
create_store(
156158
"fs",
157159
{
@@ -161,6 +163,7 @@ def test_create_store_fs(mocker):
161163
}
162164
)
163165
mock_fs.assert_called_once_with('this/is/a/relative/fspath')
166+
mock_makedirs.assert_called_once_with('this/is/a/relative/fspath')
164167

165168

166169
def test_create_store_mem(mocker):

0 commit comments

Comments
 (0)