diff options
Diffstat (limited to 'chimere/tests.py')
| -rw-r--r-- | chimere/tests.py | 16 | 
1 files changed, 12 insertions, 4 deletions
| diff --git a/chimere/tests.py b/chimere/tests.py index 5c76d2b..a051d52 100644 --- a/chimere/tests.py +++ b/chimere/tests.py @@ -12,6 +12,7 @@ from django.conf import settings  from django.contrib.auth.models import User  from django.contrib.gis.geos import GEOSGeometry  from django.contrib.messages.storage.fallback import FallbackStorage +from django.core.files import File  from django.core.urlresolvers import reverse  from django.template import Context  from django.test import TestCase @@ -136,7 +137,8 @@ class ImporterTest:              nb, nb_updated, res = importer.manager.get()              if awaited_nb == None:                  continue -            self.assertEqual(nb, awaited_nb) +            self.assertEqual(nb, awaited_nb, msg=u"%s: get test failed" % +                                                    unicode(self.__class__))              self.assertEqual(nb_updated, 0)              for cat in importer.categories.all():                  if cat not in nb_by_cat: @@ -176,7 +178,8 @@ class ImporterTest:              nb, nb_updated, res = importer.manager.get()              if awaited_nb == None:                  continue -            self.assertEqual(nb, 1) +            self.assertEqual(nb, 1, msg=u"%s: overwrite test failed" % +                                             unicode(self.__class__))  class KMLImporterTest(TestCase, ImporterTest):      def setUp(self): @@ -299,9 +302,14 @@ class GeoRSSImporterTest(TestCase, ImporterTest):  class HtmlXsltImporterTest(TestCase, ImporterTest):      def setUp(self):          subcategories = subcategory_setup() +        xslt1 = File(open(test_dir_path + 'tests/villiers-le-bacle.xslt')) +        xslt2 = File(open(test_dir_path + 'tests/villiers-le-bacle-detail.xslt'))          importer1 = Importer.objects.create(importer_type='XSLT', -                         source='http://www.ville-villierslebacle.fr/') -        self.marker_importers = [(importer1, 5),] +             source='http://www.chymeres.net/test/ville-villierslebacle.fr/', +             source_file=xslt1, source_file_alt=xslt2, +             default_localisation='SRID=4326;POINT(-4.5 48.4)',) +        importer1.categories.add(subcategories[0]) +        self.marker_importers = [(importer1, 7),]  class FeedsTest(TestCase):      def setUp(self): | 
