removed leftover decorator from before testing rework
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Failing after 2m2s
Build and deploy the backend to staging / Deploy to staging (pull_request) Has been skipped
Run linting on the backend code / Build (pull_request) Successful in 2m37s
Run testing on the backend code / Build (pull_request) Failing after 3m16s

This commit is contained in:
2025-10-19 22:09:56 +02:00
parent bfc0c9adae
commit a884b9ee14

View File

@@ -94,34 +94,3 @@ def log_trip_details(request, landmarks: list[Landmark], duration: int, target_d
request.node.trip_details = trip_string request.node.trip_details = trip_string
request.node.trip_duration = str(duration) # result['total_time'] request.node.trip_duration = str(duration) # result['total_time']
request.node.target_duration = str(target_duration) request.node.target_duration = str(target_duration)
def trip_params(
sightseeing: int,
shopping: int,
nature: int,
max_time_minute: int,
start_coords: tuple[float, float] = None,
end_coords: tuple[float, float] = None,
):
def decorator(test_func):
@wraps(test_func)
def wrapper(client, request):
prefs = Preferences(
sightseeing=Preference(type='sightseeing', score=sightseeing),
shopping=Preference(type='shopping', score=shopping),
nature=Preference(type='nature', score=nature),
max_time_minute=max_time_minute,
detour_tolerance_minute=0,
)
start = start_coords
end = end_coords
# Inject into test function
return test_func(client, request, prefs, start, end)
return wrapper
return decorator