From 56d9a1a3add2227f5d606fb6fa7d1a5263db7491 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 11 Nov 2016 13:55:24 +0100 Subject: [PATCH] Skip test_send_mail_with_user_locale if .mo files do not exist --- src/tests/base/test_mail.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/base/test_mail.py b/src/tests/base/test_mail.py index 53629306bb..93d79a0215 100644 --- a/src/tests/base/test_mail.py +++ b/src/tests/base/test_mail.py @@ -1,3 +1,5 @@ +import os + import pytest from django.conf import settings from django.core import mail as djmail @@ -60,6 +62,10 @@ def test_send_mail_with_default_sender(env): @pytest.mark.django_db +@pytest.mark.skipif( + not os.path.exists(os.path.join(settings.LOCALE_PATHS[0], 'de', 'LC_MESSAGES', 'django.mo')), + reason="requires locale files to be compiled" +) def test_send_mail_with_user_locale(env): djmail.outbox = [] event, user, organizer = env