diff options
Diffstat (limited to 'chimere/tests.py')
| -rw-r--r-- | chimere/tests.py | 18 | 
1 files changed, 15 insertions, 3 deletions
diff --git a/chimere/tests.py b/chimere/tests.py index ef54d0b..3a3144e 100644 --- a/chimere/tests.py +++ b/chimere/tests.py @@ -137,8 +137,9 @@ class ImporterTest:              nb, nb_updated, res = importer.manager.get()              if awaited_nb == None:                  continue -            self.assertEqual(nb, awaited_nb, msg=u"%s: get test failed" % -                                                    unicode(self.__class__)) +            self.assertEqual(nb, awaited_nb, +		msg=u"%s: get test failed - got %d when %d was awaited" % +				    (unicode(self.__class__), nb, awaited_nb))              self.assertEqual(nb_updated, 0)              for cat in importer.categories.all():                  if cat not in nb_by_cat: @@ -311,6 +312,17 @@ class HtmlXsltImporterTest(TestCase, ImporterTest):          importer1.categories.add(subcategories[0])          self.marker_importers = [(importer1, 7),] +class XmlXsltImporterTest(TestCase, ImporterTest): +    def setUp(self): +        subcategories = subcategory_setup() +        xslt1 = File(open(test_dir_path + 'tests/magny-xml.xslt')) +        importer1 = Importer.objects.create(importer_type='XXLT', +             source='http://www.chymeres.net/test/magny.xml', +             source_file=xslt1, +             default_localisation='SRID=4326;POINT(-4.5 48.4)',) +        importer1.categories.add(subcategories[0]) +        self.marker_importers = [(importer1, 10),] +  class FeedsTest(TestCase):      def setUp(self):          self.areas = areas_setup() @@ -442,7 +454,7 @@ class DynamicCategoryTest(TestCase):          response = self.client.get(url)          self.assertEqual(200, response.status_code)          cats = json.loads(response.content)['categories'] -        self.assertEqual(len(cats), 2) +        self.assertEqual(len(cats), 5)  class NewsTest(TestCase):      def setUp(self):  | 
