summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-02-02 17:28:25 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-02-02 17:28:25 +0100
commita317ba6daa2c17366d9530d631b884c8e33a8196 (patch)
treeddeb3935c1ab69b2cb564441c822f6559836fabd /ishtar_common/tests.py
parent8cf538bc465b4879c2bad8a9205ebe89f81b742b (diff)
downloadIshtar-a317ba6daa2c17366d9530d631b884c8e33a8196.tar.bz2
Ishtar-a317ba6daa2c17366d9530d631b884c8e33a8196.zip
Quiet version of town imports. Fix test evaluation for the new UI.
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py13
1 files changed, 8 insertions, 5 deletions
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()