Skip to content

Commit e015cea

Browse files
committed
fix: patch only one os function, not the whole module
The problem was in os.path receiving a Mock object in tests instead of just a string, leading to the failed schema validation
1 parent 4aeb0ab commit e015cea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/unit/properties/non_scalar/test_workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ def setUp(self):
1313
def tearDown(self):
1414
super().setUp()
1515

16-
@mock.patch("express.properties.workflow.os")
17-
def test_pyml_workflow(self, mock_os):
18-
mock_os.listdir.return_value = MOCK_BASENAMES
16+
@mock.patch("express.properties.workflow.os.listdir")
17+
def test_pyml_workflow(self, mock_os_listdir):
18+
mock_os_listdir.return_value = MOCK_BASENAMES
1919

2020
name = NAME
2121
parser = PARSER

0 commit comments

Comments
 (0)