Skip to content

Commit 92d10ba

Browse files
committed
Add photos mixins tests
1 parent 88dbee7 commit 92d10ba

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ def photoalbum(photos):
276276
return photos.get("photo_album1")
277277

278278

279+
@pytest.fixture()
280+
def photo(photoalbum):
281+
return photoalbum.photo("photo1")
282+
283+
279284
@pytest.fixture()
280285
def subtitle():
281286
mopen = mock_open()

tests/test_photo.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
from . import test_mixins
3+
4+
15
def test_photo_Photoalbum(photoalbum):
26
assert len(photoalbum.albums()) == 3
37
assert len(photoalbum.photos()) == 3
48
cats_in_bed = photoalbum.album("Cats in bed")
59
assert len(cats_in_bed.photos()) == 7
610
a_pic = cats_in_bed.photo("photo7")
711
assert a_pic
12+
13+
14+
def test_photo_Photoalbum_mixins_images(photoalbum):
15+
test_mixins.edit_art(photoalbum)
16+
test_mixins.edit_poster(photoalbum)
17+
test_mixins.attr_artUrl(photoalbum)
18+
test_mixins.attr_posterUrl(photoalbum)
19+
20+
21+
def test_photo_Photo_mixins_tags(photo):
22+
test_mixins.edit_tag(photo)

0 commit comments

Comments
 (0)