@@ -0,0 +1,1532 @@
+# -*- coding: utf-8 -*-%0Afrom django.test import TestCase%0A%0Afrom geotrek.core.factories import PathFactory%0Afrom geotrek.signage.factories import SignageFactory, SealingFactory, BladeTypeFactory, BladeFactory%0Afrom geotrek.infrastructure.factories import InfrastructureFactory%0Afrom django.contrib.gis.geos import LineString%0A%0A%0Aclass SignageModelTest(TestCase):%0A    def test_gps_value_all_cases(self):%0A        path = PathFactory.create(geom=LineString((-4, -4), (4, 4), srid=4326))%0A        signage_N_E = SignageFactory.create(no_path=True)%0A        signage_S_W = SignageFactory.create(no_path=True)%0A        signage_N_E.add_path(path, start=1, end=1)%0A        signage_S_W.add_path(path, start=0, end=0)%0A        self.assertEqual(signage_N_E.gps_value, u'4.0%C2%B0N, 4.0%C2%B0E')%0A        self.assertEqual(signage_S_W.gps_value, u'4.0%C2%B0S, 4.0%C2%B0W')%0A%0A%0Aclass SealingModelTest(TestCase):%0A    def test_sealing_value(self):%0A        sealing = SealingFactory.create(label='sealing_1', structure=None)%0A        self.assertEqual(str(sealing), 'sealing_1')%0A%0A%0Aclass BladeTypeModelTest(TestCase):%0A    def test_bladetype_value(self):%0A        type = BladeTypeFactory.create(label='type_1', structure=None)%0A        self.assertEqual(str(type), 'type_1')%0A%0A%0Aclass BladeModelTest(TestCase):%0A    def test_set_topology_other_error(self):%0A        blade = BladeFactory.create()%0A        infra = InfrastructureFactory.create()%0A        with self.assertRaises(ValueError) as e:%0A            blade.set_topology(infra)%0A        self.assertEqual(e.exception.message, %22Expecting a signage%22)%0A

Add test models signage