def test_explicit_settings(test_input): s = VaultSecret(**test_input) secret = s.dict() secret["engine"] = secret[ "engine"].name # map actual engine to str name representation assert secret == test_input
def test__split_mount_point_path(test_input, expected): assert VaultSecret._split_mount_point_path(test_input) == expected
def test_invalid_versions(test_input): with pytest.raises(ValueError): VaultSecret(**test_input)
def test_invalid_paths(test_input): with pytest.raises(pydantic.error_wrappers.ValidationError) as excinfo: VaultSecret(**test_input) assert "validation error" in str(excinfo.value)
def test_valid_versions(test_input, expected): s = VaultSecret(**test_input) secret = s.dict() for key in expected: assert secret[key] == expected[key]