Skip to content

Commit

Permalink
maint(more tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayceslesar committed Apr 6, 2024
1 parent 92c701a commit 8ad7082
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
"""Test api utilities."""

import os

import pytest

from src.api.lib import make_db_uri
from src.api.lib import DEMOS_PATH, generate_uuid4_int, make_db_uri, make_demo_path


@pytest.fixture(scope="session")
def session_id() -> str:
"""Session ID fixture."""
return generate_uuid4_int()


@pytest.fixture
Expand All @@ -25,3 +33,9 @@ def test_make_db_uri(mock_os_environ, is_async: bool, expected_uri: str) -> None
"""Test `make_db_uri`."""
actual = make_db_uri(is_async)
assert actual == expected_uri


def test_make_demo_path(session_id: str) -> None:
"""Test make demo path."""
actual = make_demo_path(session_id)
assert actual == os.path.join(DEMOS_PATH, f"{session_id}.dem")

0 comments on commit 8ad7082

Please sign in to comment.