From a317ba6daa2c17366d9530d631b884c8e33a8196 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 2 Feb 2018 17:28:25 +0100 Subject: Quiet version of town imports. Fix test evaluation for the new UI. --- ishtar_common/tests.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'ishtar_common/tests.py') diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index a46a81070..7e852a770 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -115,10 +115,12 @@ class CommandsTestCase(TestCase): town_nb = q.count() out = StringIO() call_command('import_geofla_csv', - '../ishtar_common/tests/geofla-test.csv', stdout=out) + '../ishtar_common/tests/geofla-test.csv', '--quiet', + stdout=out) self.assertEqual(town_nb + 9, models.Town.objects.count()) call_command('import_geofla_csv', - '../ishtar_common/tests/geofla-test.csv', stdout=out) + '../ishtar_common/tests/geofla-test.csv', '--quiet', + stdout=out) # no new town self.assertEqual(town_nb + 9, models.Town.objects.count()) @@ -148,14 +150,15 @@ class CommandsTestCase(TestCase): ", " + ", ".join(reversed(union_end)) + ", 0 0, " + first + ")))" out = StringIO() call_command('import_insee_comm_csv', - '../ishtar_common/tests/insee-test.csv', stdout=out) + '../ishtar_common/tests/insee-test.csv', '--quiet', + stdout=out) self.assertEqual(town_nb + 1, models.Town.objects.count()) new = models.Town.objects.order_by('-pk').all()[0] self.assertEqual(new.parents.count(), 2) self.assertEqual(new.limit.wkt, union) - call_command('import_insee_comm_csv', + call_command('import_insee_comm_csv', '--quiet', '../ishtar_common/tests/insee-test.csv', stdout=out) # no new town self.assertEqual(town_nb + 1, models.Town.objects.count()) @@ -1081,7 +1084,7 @@ class IshtarSiteProfileTest(TestCase): profile.files = True profile.save() response = c.get(reverse('start')) - self.assertTrue("section-file_management" in response.content) + self.assertIn('href="/file_search/"', response.content) def testExternalKey(self): profile = models.get_current_profile() -- cgit v1.2.3