Skip to content

Commit fe31f29

Browse files
authored
Fix token test (#611)
This test was using an incorrect mock API and this surfaced with the bump to mock==5.0.1.
1 parent fd2ad70 commit fe31f29

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/tokens/test_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
from click.testing import CliRunner
3030
import databricks_cli.tokens.cli as cli
31+
from tests.utils import provide_conf
3132

3233

3334
@pytest.fixture()
@@ -38,7 +39,8 @@ def tokens_api_mock():
3839
yield _tokens_api_mock
3940

4041

42+
@provide_conf
4143
def test_create_token_cli_defaults(tokens_api_mock):
4244
runner = CliRunner()
4345
runner.invoke(cli.create_token_cli, ['--comment', 'test'])
44-
assert tokens_api_mock.create.called_with(60 * 60 * 24 * 90, 'test')
46+
tokens_api_mock.create.assert_called_with(60 * 60 * 24 * 90, 'test')

0 commit comments

Comments
 (0)