[tests] Clean up podcast tests
This commit is contained in:
@ -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}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user