X-Git-Url: https://git.mdrn.pl/fnpdjango.git/blobdiff_plain/28b1d7e9f4a7008712736adce363ca2770d48aea..c4311d82afc1bb44566c6e612b09c4ecad1af643:/tests/tests/test_templatetags_fnp_annoy.py diff --git a/tests/tests/test_templatetags_fnp_annoy.py b/tests/tests/test_templatetags_fnp_annoy.py new file mode 100644 index 0000000..8ed80b1 --- /dev/null +++ b/tests/tests/test_templatetags_fnp_annoy.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# This file is part of FNPDjango, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See README.md for more information. +# +from __future__ import unicode_literals + +from django.test import TestCase +from django.test.utils import override_settings + + +class TemplatetagsFNPAnnoyTestCase(TestCase): + + def test_annoy(self): + from fnpdjango.templatetags import fnp_annoy + self.assertEqual( + fnp_annoy.annoy(), + '') + with override_settings(FNP_ANNOY=True): + self.assertTrue( + 'https://nowoczesnapolska.org.pl/pomoz-nam/1-procent/' + in fnp_annoy.annoy() + )