Skip to content

Commit

Permalink
Fixed review findings
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunki committed Oct 9, 2023
1 parent 5c73ee9 commit f9f65dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion secret-store/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "credential-store"
name = "secret-store"
version = "0.1.0"
description = "Stores credentials in an encrypted file."

Expand Down
16 changes: 12 additions & 4 deletions secret-store/test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import os
import sys
import pytest
from pathlib import Path
from secret_store import Secrets

here = os.path.abspath(".")
sys.path.insert(0, here)

@pytest.fixture
def sample_file(tmp_path: Path) -> Path:
return tmp_path / "sample_database.db"


@pytest.fixture
def secrets(sample_file) -> Path:
return Secrets(sample_file, master_password="abc")
11 changes: 0 additions & 11 deletions secret-store/test/test_secret_store.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
import os
import pytest
from pathlib import Path
from secret_store import Credentials, InvalidPassword, Secrets
from sqlcipher3 import dbapi2 as sqlcipher


@pytest.fixture
def sample_file(tmp_path: Path) -> Path:
return tmp_path / "sample_database.db"


@pytest.fixture
def secrets(sample_file) -> Path:
return Secrets(sample_file, master_password="abc")


def test_no_database_file(secrets):
assert not os.path.exists(secrets.db_file)

Expand Down

0 comments on commit f9f65dc

Please sign in to comment.