[tests] Simplify view tests to not mess with time

This commit is contained in:
2025-04-07 12:30:54 -04:00
parent 28cf57c6dd
commit 6c461ed55f
3 changed files with 125 additions and 36 deletions

View File

@ -1034,7 +1034,6 @@ class Scrobble(TimeStampedModel):
"scrobble_data": scrobble_data,
},
)
scrobble_data["playback_status"] = scrobble_data.pop("status", None)
# If it's marked as stopped, send it through our update mechanism, which will complete it
if scrobble and (
@ -1140,9 +1139,9 @@ class Scrobble(TimeStampedModel):
if existing_locations := location.in_proximity(named=True):
existing_location = existing_locations.first()
ts = int(pendulum.now().timestamp())
scrobble.log[ts] = (
f"Location {location.id} too close to this scrobble"
)
scrobble.log[
ts
] = f"Location {location.id} too close to this scrobble"
scrobble.save(update_fields=["log"])
logger.info(
f"[scrobbling] finished - found existing named location",