diff options
Diffstat (limited to 'chimere/tests.py')
-rw-r--r-- | chimere/tests.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chimere/tests.py b/chimere/tests.py index 3a3144e..6c39cba 100644 --- a/chimere/tests.py +++ b/chimere/tests.py @@ -323,6 +323,22 @@ class XmlXsltImporterTest(TestCase, ImporterTest): importer1.categories.add(subcategories[0]) self.marker_importers = [(importer1, 10),] + +class JsonImporterTest(TestCase, ImporterTest): + def setUp(self): + subcategories = subcategory_setup() + jsonfile = File(open(test_dir_path + 'tests/test.json')) + importer1 = Importer.objects.create( + importer_type='JSON', + source_file=jsonfile, + filtr='{"title":"name", "id_agenda":"id", ' + '"content":"description", "date_start_evt":"start_date", ' + '"date_end_evt":"end_date"}', + default_localisation='SRID=4326;POINT(-4.5 48.4)',) + importer1.categories.add(subcategories[0]) + self.marker_importers = [(importer1, 5), ] + + class FeedsTest(TestCase): def setUp(self): self.areas = areas_setup() |