Skip to content

Commit

Permalink
Adding new fixture.
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-silva-funttastic committed Mar 20, 2024
1 parent 73958d3 commit 7bae3a6
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

0 comments on commit 7bae3a6

Please sign in to comment.