Persist best efforts during import and add resumable backfill
This commit is contained in:
@@ -3,16 +3,18 @@ from types import SimpleNamespace
|
||||
|
||||
import pytest
|
||||
|
||||
from app.records import best_efforts, record_book
|
||||
from app.records import best_efforts, persist_efforts, record_book
|
||||
|
||||
|
||||
def run(points, id=1, sport="running"):
|
||||
return SimpleNamespace(
|
||||
activity = SimpleNamespace(
|
||||
id=id,
|
||||
sport=sport,
|
||||
started_at=datetime(2026, 1, 1, tzinfo=UTC) + timedelta(days=id),
|
||||
samples=[{"distance": d, "time": t} for d, t in points],
|
||||
)
|
||||
persist_efforts(activity)
|
||||
return activity
|
||||
|
||||
|
||||
def test_fastest_window_can_start_between_samples():
|
||||
|
||||
Reference in New Issue
Block a user