Skip to content

Commit 520f8a5

Browse files
authored
tests(treescript): fix assertions to actually test something (#1372)
Caught by python 3.12+ (python/cpython#100690): AttributeError: 'called_with' is not a valid assertion. Use a spec for the mock if 'called_with' is meant to be an attribute.
1 parent d33b356 commit 520f8a5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎treescript/tests/test_script.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ async def test_async_main(mocker, task, expected):
7171
else:
7272
await script.async_main(config, task)
7373
if expected == "github":
74-
assert github_mock.called_with(config, task)
74+
github_mock.assert_called_with(config, task)
7575
assert not gecko_mock.called
7676
elif expected == "gecko":
77-
assert gecko_mock.called_with(config, task)
77+
gecko_mock.assert_called_with(config, task)
7878
assert not github_mock.called
7979

8080

0 commit comments

Comments
 (0)