X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/260c9aa4773fe85dcaa3cfc18d9586f915a327b0..0f7ebe49c20394d80afb129b29e4afa411347441:/apps/catalogue/test_utils.py diff --git a/apps/catalogue/test_utils.py b/apps/catalogue/test_utils.py new file mode 100644 index 00000000..2b085450 --- /dev/null +++ b/apps/catalogue/test_utils.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +"""Testing utilities.""" + +from os.path import abspath, dirname, join + + +def get_fixture(path): + f_path = join(dirname(abspath(__file__)), 'tests/files', path) + with open(f_path) as f: + return unicode(f.read(), 'utf-8')