# -*- coding: utf-8 -*- # type: ignore from __future__ import annotations from unittest import mock import hvac import pytest from pytest_mock import MockerFixture from .fixtures import TestingVaultSecrets @pytest.fixture def hvac_client() -> mock.Mock: return mock.Mock(spec=hvac.Client) @pytest.fixture def mock_hvac_client(mocker: MockerFixture, hvac_client: mock.Mock, ) -> mock.Mock: return mocker.patch( 'keep_it_secret.ext.vault.hvac.Client', return_value=hvac_client, ) @pytest.fixture def testing_vault_secrets() -> TestingVaultSecrets: return TestingVaultSecrets()