from __future__ import annotations
import base64
import contextlib
import json
import os
from typing import TYPE_CHECKING
import click.testing
import hypothesis
import pytest
from hypothesis import strategies
import tests
from derivepassphrase import _types, cli, exporter
from derivepassphrase.exporter import storeroom, vault_native
cryptography = pytest.importorskip('cryptography', minversion='38.0')
from cryptography.hazmat.primitives import (
ciphers,
hashes,
hmac,
padding,
)
from cryptography.hazmat.primitives.ciphers import (
algorithms,
modes,
)
if TYPE_CHECKING:
from collections.abc import Callable
from typing import Any
from typing_extensions import Buffer, Literal
class TestCLI:
def test_200_path_parameter(self, monkeypatch: pytest.MonkeyPatch) -> None:
runner = click.testing.CliRunner(mix_stderr=False)
with tests.isolated_vault_exporter_config(
monkeypatch=monkeypatch,
runner=runner,
vault_config=tests.VAULT_V03_CONFIG,
vault_key=tests.VAULT_MASTER_KEY,
):
monkeypatch.setenv('VAULT_KEY', tests.VAULT_MASTER_KEY)