Add photos mixins tests

This commit is contained in:
JonnyWong16 2021-02-14 22:58:48 -08:00
parent 88dbee7508
commit 92d10bac17
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 20 additions and 0 deletions

View file

@ -276,6 +276,11 @@ def photoalbum(photos):
return photos.get("photo_album1")
@pytest.fixture()
def photo(photoalbum):
return photoalbum.photo("photo1")
@pytest.fixture()
def subtitle():
mopen = mock_open()

View file

@ -1,3 +1,7 @@
# -*- coding: utf-8 -*-
from . import test_mixins
def test_photo_Photoalbum(photoalbum):
assert len(photoalbum.albums()) == 3
assert len(photoalbum.photos()) == 3
@ -5,3 +9,14 @@ def test_photo_Photoalbum(photoalbum):
assert len(cats_in_bed.photos()) == 7
a_pic = cats_in_bed.photo("photo7")
assert a_pic
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)
def test_photo_Photo_mixins_tags(photo):
test_mixins.edit_tag(photo)