Exemple #1
0
 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
Exemple #2
0
 def test__split_mount_point_path(test_input, expected):
     assert VaultSecret._split_mount_point_path(test_input) == expected
Exemple #3
0
 def test_invalid_versions(test_input):
     with pytest.raises(ValueError):
         VaultSecret(**test_input)
Exemple #4
0
 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)
Exemple #5
0
 def test_valid_versions(test_input, expected):
     s = VaultSecret(**test_input)
     secret = s.dict()
     for key in expected:
         assert secret[key] == expected[key]