-# -*- coding: utf-8 -*-
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
AtomNS = XMLNamespace("http://www.w3.org/2005/Atom")
-@skipIf(getattr(settings, 'NO_SEARCH_INDEX', False), u'Requires search server and NO_SEARCH_INDEX=False.')
+@skipIf(getattr(settings, 'NO_SEARCH_INDEX', False), 'Requires search server and NO_SEARCH_INDEX=False.')
class OpdsSearchTests(WLTestCase):
"""Tests search feed in OPDS.."""
def setUp(self):
self.client.get('/opds/search/?%s' % query).content)
elem_ids = tree.findall('.//%s/%s' % (AtomNS('entry'), AtomNS('id')))
slugs = [WLURI(elem.text).slug for elem in elem_ids]
- self.assertEqual(set(slugs), set(b.slug for b in books), u"OPDS search '%s' failed." % query)
+ self.assertEqual(set(slugs), set(b.slug for b in books), "OPDS search '%s' failed." % query)
def test_opds_search_simple(self):
"""Do a simple q= test, also emulate dumb OPDS clients."""