[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

@ -4,8 +4,9 @@ import pytest
from django.contrib.auth import get_user_model
from rest_framework.authtoken.models import Token
from scrobbles.models import Scrobble
from boardgames.models import BoardGame
from music.models import Track, Artist
from scrobbles.models import Scrobble
User = get_user_model()
@ -27,6 +28,15 @@ def boardgame_scrobble():
)
@pytest.fixture
def test_track():
Track.objects.create(
title="Emotion",
artist=Artist.objects.create(name="Carly Rae Jepsen"),
run_time_seconds=60,
)
class MopidyRequest:
name = "Same in the End"
artist = "Sublime"