tests: remove pyfakefs due to issues with pathlib and sqlite in favor of a simple tempfolder where to store test files
This commit is contained in:
parent
4fb1fff521
commit
c6d361f649
6 changed files with 45 additions and 29 deletions
|
|
@ -4,27 +4,26 @@ from halig.encryption import Encryptor
|
|||
from halig.settings import Settings
|
||||
|
||||
|
||||
def test_instance_encryptor_from_age_keys(halig_path, notebooks_path):
|
||||
def test_instance_encryptor_from_age_keys(notebooks_path, halig_config_path):
|
||||
identity_paths = []
|
||||
recipient_paths = []
|
||||
identities = []
|
||||
for i in range(5):
|
||||
identity = x25519.Identity.generate()
|
||||
identities.append(identity)
|
||||
identity_path = halig_path / f"identity_{i}.key"
|
||||
identity_path = halig_config_path / f"identity_{i}.key"
|
||||
identity_path.touch()
|
||||
with identity_path.open("w") as f:
|
||||
f.write(str(identity))
|
||||
identity_paths.append(identity_path)
|
||||
|
||||
recipient_path = halig_path / f"recipient_{i}.key"
|
||||
recipient_path = halig_config_path / f"recipient_{i}.key"
|
||||
recipient_path.touch()
|
||||
|
||||
with recipient_path.open("w") as f:
|
||||
f.write(str(identity.to_public()))
|
||||
|
||||
recipient_paths.append(recipient_path)
|
||||
# cache_path = platformdirs.user_cache_path("halig", ensure_exists=True)
|
||||
settings = Settings(
|
||||
notebooks_root_path=notebooks_path,
|
||||
identity_paths=identity_paths,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue