mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
28cc5225a7
Signed-off-by: Joe P <joe@basicmemory.com> Signed-off-by: phernandez <paul@basicmachines.co> Signed-off-by: Claude <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Paul Hernandez <60959+phernandez@users.noreply.github.com> Co-authored-by: phernandez <paul@basicmachines.co>
22 lines
547 B
Python
22 lines
547 B
Python
"""Fixtures for V2 API tests."""
|
|
|
|
import pytest
|
|
|
|
from basic_memory.models import Project
|
|
|
|
|
|
@pytest.fixture
|
|
def v2_project_url(test_project: Project) -> str:
|
|
"""Create a URL prefix for v2 project-scoped routes using project ID.
|
|
|
|
This helps tests generate the correct URL for v2 project-scoped routes
|
|
which use integer project IDs instead of permalinks.
|
|
"""
|
|
return f"/v2/projects/{test_project.id}"
|
|
|
|
|
|
@pytest.fixture
|
|
def v2_projects_url() -> str:
|
|
"""Base URL for v2 project management endpoints."""
|
|
return "/v2/projects"
|