diff --git a/tests/test_gallery.py b/tests/test_gallery.py index afc4d44..f152b4b 100644 --- a/tests/test_gallery.py +++ b/tests/test_gallery.py @@ -1,4 +1,3 @@ -import locale import logging import os import pytest @@ -152,31 +151,21 @@ def test_video(settings, tmpdir): @pytest.mark.parametrize("path,album", REF.items()) def test_album(path, album, settings, tmpdir): - # store current locale - old_locale = locale.setlocale(locale.LC_ALL) + gal = Gallery(settings, ncpu=1) + a = Album(path, settings, album['subdirs'], album['medias'], gal) - # locale.setlocale(locale.LC_ALL, 'fr_FR') - locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') - - try: - gal = Gallery(settings, ncpu=1) - a = Album(path, settings, album['subdirs'], album['medias'], gal) - - assert a.title == album['title'] - assert a.name == album['name'] - assert a.subdirs == album['subdirs'] - assert a.thumbnail == album['thumbnail'] - if path == 'video': - assert list(a.images) == [] - assert [m.filename for m in a.medias] == \ - [album['medias'][0].replace('.ogv', '.webm')] - else: - assert list(a.videos) == [] - assert [m.filename for m in a.medias] == album['medias'] - assert len(a) == len(album['medias']) - finally: - # restore locale back - locale.setlocale(locale.LC_ALL, old_locale) + assert a.title == album['title'] + assert a.name == album['name'] + assert a.subdirs == album['subdirs'] + assert a.thumbnail == album['thumbnail'] + if path == 'video': + assert list(a.images) == [] + assert [m.filename for m in a.medias] == \ + [album['medias'][0].replace('.ogv', '.webm')] + else: + assert list(a.videos) == [] + assert [m.filename for m in a.medias] == album['medias'] + assert len(a) == len(album['medias']) def test_albums_sort(settings):