[tests] Clean up podcast tests

This commit is contained in:
2025-04-07 13:40:32 -04:00
parent 4767cc7e52
commit 257e6899d3
3 changed files with 15 additions and 57 deletions

View File

@ -9,6 +9,7 @@ from django.db import models
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from django_extensions.db.models import TimeStampedModel
from podcasts.sources.podcastindex import lookup_podcast_from_podcastindex
from scrobbles.mixins import (
ObjectWithGenres,
ScrobblableConstants,
@ -16,10 +17,6 @@ from scrobbles.mixins import (
)
from taggit.managers import TaggableManager
from podcasts.sources.podcastindex import (
lookup_podcast_from_podcastindex,
)
logger = logging.getLogger(__name__)
BNULL = {"blank": True, "null": True}
@ -115,6 +112,11 @@ class PodcastEpisode(ScrobblableMixin):
pub_date = models.DateField(**BNULL)
mopidy_uri = models.CharField(max_length=255, **BNULL)
def get_absolute_url(self):
return reverse(
"podcasts:podcast_detail", kwargs={"slug": self.podcast.uuid}
)
def __str__(self):
return f"{self.title}"