Skip to content

Commit

Permalink
Fix token test (#611)
Browse files Browse the repository at this point in the history
This test was using an incorrect mock API and this surfaced
with the bump to mock==5.0.1.
  • Loading branch information
pietern authored Mar 10, 2023
1 parent fd2ad70 commit fe31f29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/tokens/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

from click.testing import CliRunner
import databricks_cli.tokens.cli as cli
from tests.utils import provide_conf


@pytest.fixture()
Expand All @@ -38,7 +39,8 @@ def tokens_api_mock():
yield _tokens_api_mock


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

0 comments on commit fe31f29

Please sign in to comment.