Skip to content

Commit e8e92dc

Browse files
committed
Fix unit test for tempdir
1 parent 14a775e commit e8e92dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_post_operation.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ def test_post_good_query(self, mocker):
4646

4747
response = client.post("/servicex/generated-code", data=select_stmt)
4848
assert response.status_code == 200
49-
mock_ast_translator.generate_code.assert_called_with(select_stmt)
49+
# Capture the temporary directory that was generated
50+
cache_dir = mock_ast_translator.generate_code.call_args[1]['cache_path']
51+
mock_ast_translator.generate_code.assert_called_with(select_stmt,
52+
cache_path=cache_dir)
5053

5154
def test_post_codegen_error_query(self, mocker):
5255
"""Post a query with a code-gen level error"""

0 commit comments

Comments
 (0)