diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 532a3ed9..b23428f0 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -6,12 +6,14 @@ Read more about conftest.py under: https://pytest.org/latest/plugins.html """ +import os + from pathlib import Path from tempfile import NamedTemporaryFile from typing import Generator import pytest -from aleph.sdk.chains.common import generate_key +from aleph.sdk.chains.common import generate_key, get_public_key @pytest.fixture @@ -26,3 +28,19 @@ def account_file(empty_account_file: Path) -> Path: empty_account_file.write_bytes(private_key) return empty_account_file + + +@pytest.fixture +def ssh_keys_files(empty_account_file: Path) -> dict[str, Path]: + private_key_file = Path(os.path.join( + Path(__file__).parent.parent, "fixtures", "example_ssh_key") + ).absolute() + + public_key_file = Path(os.path.join( + Path(__file__).parent.parent, "fixtures", "example_ssh_key.pub") + ).absolute() + + return { + "private_key": private_key_file, + "public_key": public_key_file + }