Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copy
from datetime import datetime, timedelta

import jwt
Expand Down Expand Up @@ -216,14 +217,15 @@ def time_entries_dao():
return time_entries_dao


@pytest.yield_fixture(scope="module")
@pytest.fixture(scope="module")
def running_time_entry(
time_entry_repository: TimeEntryCosmosDBRepository,
owner_id: str,
tenant_id: str,
event_context: EventContext,
):
created_time_entry = time_entry_repository.create(
current_time_entry_repository = copy.copy(time_entry_repository)
created_time_entry = current_time_entry_repository.create(
{
"project_id": fake.uuid4(),
"owner_id": owner_id,
Expand All @@ -234,7 +236,7 @@ def running_time_entry(

yield created_time_entry

time_entry_repository.delete_permanently(
current_time_entry_repository.delete_permanently(
id=created_time_entry.id, event_context=event_context
)

Expand Down