python-plexapi/tests/test_photo.py

36 lines
890 B
Python
Raw Normal View History

2021-02-15 06:58:48 +00:00
# -*- coding: utf-8 -*-
2021-05-09 22:05:06 +00:00
from . import test_media, test_mixins
2021-02-15 06:58:48 +00:00
def test_photo_Photoalbum(photoalbum):
assert len(photoalbum.albums()) == 3
assert len(photoalbum.photos()) == 3
2020-04-29 21:23:22 +00:00
cats_in_bed = photoalbum.album("Cats in bed")
assert len(cats_in_bed.photos()) == 7
2020-04-29 21:23:22 +00:00
a_pic = cats_in_bed.photo("photo7")
assert a_pic
2021-02-15 06:58:48 +00:00
def test_photo_Photoalbum_mixins_images(photoalbum):
test_mixins.edit_art(photoalbum)
test_mixins.edit_poster(photoalbum)
test_mixins.attr_artUrl(photoalbum)
test_mixins.attr_posterUrl(photoalbum)
2021-05-30 22:49:28 +00:00
def test_photo_Photoalbum_mixins_rating(photoalbum):
test_mixins.edit_rating(photoalbum)
def test_photo_Photo_mixins_rating(photo):
test_mixins.edit_rating(photo)
2021-02-15 06:58:48 +00:00
def test_photo_Photo_mixins_tags(photo):
test_mixins.edit_tag(photo)
2021-05-09 22:05:06 +00:00
def test_photo_Photo_media_tags(photo):
photo.reload()
test_media.tag_tag(photo)